Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add treefmt.toml
Browse files Browse the repository at this point in the history
treefmt shells out to different formatters. It uses a minimal config
file, making it easy to configure which files should be formatted
with which formatter.

Signed-off-by: Thomas Frank <thomas.frank@esrlabs.com>
ThoFrank committed Nov 4, 2024
1 parent 998bb2b commit 7922684
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .treefmt.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
[global]
excludes = [
"**/3rdparty/*/**",
"**/Makefile",
"*.*-format",
"*.S",
"*.cmm",
"*.css",
"*.dld",
"*.gdb",
"*.gif",
"*.gitignore",
"*.html",
"*.ini",
"*.josh",
"*.json",
"*.md",
"*.png",
"*.py",
"*.rb",
"*.rst",
"*.s",
"*.sh",
"*.spec",
"*.toml",
"*.txt",
"*.yaml",
"*.yml",
"LICENSE",
]

[formatter.cpp]
command = "clang-format"
options = [ "--style=file", "-i" ]
includes = [ "*.c", "*.cc", "*.cpp", "*.h", ".hh", "*.hpp" ]

[formatter.cmake]
command = "cmake-format"
options = [ "-i" ]
includes = [ "**/CMakeLists.txt", "*.cmake" ]

0 comments on commit 7922684

Please sign in to comment.