-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtreefmt.toml
More file actions
70 lines (60 loc) · 1.66 KB
/
Copy pathtreefmt.toml
File metadata and controls
70 lines (60 loc) · 1.66 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# SPDX-License-Identifier: BSD-2-Clause
# Copyright (c) 2026, Timo Pallach (timo@pallach.de).
# Use .git/config to find the tree root automatically
tree-root-file = ".git/config"
# Exclude files that should not be formatted
# Only includes file types that actually exist in the project and have no formatter
# This allows treefmt to warn about new unhandled file types
excludes = [
# Plain text files with no formatter
"LICENSE",
".gitignore",
# Go module lock file (auto-managed by go toolchain)
"go.sum",
# Generated security scan result files
"grype_*.json",
"osv-scanner_*.json",
# Generated SBOM artifact
"sbom.cdx.xml",
# Unattended installer config files (no formatter)
"*.cfg",
"*.conf",
# Packer unattended/answer templates (no formatter in treefmt)
"*.pkrtpl",
# Go module file (managed by go toolchain)
"go.mod",
# Makefile has no widely-used formatter (validated by make/bmake parse checks)
"Makefile",
]
[formatter.gofmt]
command = "gofmt"
includes = ["*.go"]
options = ["-w"]
[formatter.shfmt]
command = "shfmt"
includes = ["*.sh"]
options = ["--write", "--posix", "--indent", "4"]
[formatter.packer]
command = "packer"
includes = ["*.pkr.hcl"]
options = ["fmt"]
[formatter.taplo]
command = "taplo"
includes = ["*.toml"]
options = ["fmt"]
[formatter.clang-format]
command = "clang-format"
includes = ["*.c", "*.h"]
options = ["--style=LLVM", "-i"]
[formatter.prettier-markdown]
command = "prettier"
includes = ["*.md", "*.mdx"]
options = ["--write"]
[formatter.prettier-yaml]
command = "prettier"
includes = ["*.yml", "*.yaml"]
options = ["--write"]
[formatter.prettier-json]
command = "prettier"
includes = ["*.json"]
options = ["--write"]