2025-03-20 06:47:13 +01:00
|
|
|
# https://github.com/numtide/treefmt
|
|
|
|
# https://github.com/numtide/treefmt-nix
|
|
|
|
|
2025-03-19 22:25:52 +01:00
|
|
|
on-unmatched = "info"
|
|
|
|
|
|
|
|
[formatter.clang-format]
|
|
|
|
command = "clang-format"
|
2025-03-20 22:49:01 +01:00
|
|
|
options = ["-i"]
|
2025-03-19 22:25:52 +01:00
|
|
|
|
|
|
|
# Only target the exact directories we want
|
|
|
|
includes = [
|
2025-03-20 06:47:13 +01:00
|
|
|
# Non-recursive for src root
|
|
|
|
"src/*.cpp",
|
|
|
|
"src/*.h",
|
2025-03-19 22:25:52 +01:00
|
|
|
|
2025-03-20 06:47:13 +01:00
|
|
|
# Recursive for specific subdirectories
|
|
|
|
"src/entities/**/*.cpp",
|
|
|
|
"src/entities/**/*.h",
|
|
|
|
"src/utils/**/*.cpp",
|
|
|
|
"src/utils/**/*.h",
|
|
|
|
"src/helpers/**/*.cpp",
|
|
|
|
"src/helpers/**/*.h",
|
|
|
|
"src/services/**/*.cpp",
|
|
|
|
"src/services/**/*.h",
|
|
|
|
"src/widgets/**/*.cpp",
|
|
|
|
"src/widgets/**/*.h",
|
|
|
|
"src/dialogs/**/*.cpp",
|
|
|
|
"src/dialogs/**/*.h",
|
|
|
|
"src/api/**/*.cpp",
|
|
|
|
"src/api/**/*.h",
|
|
|
|
"src/libraries/piwiktracker/**/*.cpp",
|
|
|
|
"src/libraries/piwiktracker/**/*.h",
|
|
|
|
"src/libraries/qmarkdowntextedit/**/*.cpp",
|
|
|
|
"src/libraries/qmarkdowntextedit/**/*.h",
|
2025-03-19 22:25:52 +01:00
|
|
|
|
2025-03-20 06:47:13 +01:00
|
|
|
# Recursive for tests
|
|
|
|
"tests/unit_tests/**/*.cpp",
|
|
|
|
"tests/unit_tests/**/*.h",
|
2025-03-19 22:25:52 +01:00
|
|
|
]
|
|
|
|
|
|
|
|
# Explicitly exclude everything else
|
|
|
|
excludes = [
|
2025-03-20 06:47:13 +01:00
|
|
|
# Exclude everything not explicitly included
|
|
|
|
"src/libraries/**/*.cpp",
|
|
|
|
"src/libraries/**/*.cxx",
|
|
|
|
"src/libraries/**/*.c",
|
|
|
|
"src/libraries/**/*.h",
|
|
|
|
"src/libraries/**/*.hxx",
|
|
|
|
# You can add more specific exclusions here as needed
|
2025-03-19 22:25:52 +01:00
|
|
|
]
|
|
|
|
|
|
|
|
[formatter.prettier]
|
|
|
|
command = "prettier"
|
2025-03-20 21:03:04 +01:00
|
|
|
options = ["--write"]
|
2025-03-20 06:47:13 +01:00
|
|
|
includes = ["webpage/**/*.vue", "webpage/**/*.js", "*.md", "*.yaml", "*.yml"]
|
2025-03-19 22:25:52 +01:00
|
|
|
|
|
|
|
[formatter.shfmt]
|
|
|
|
command = "shfmt"
|
|
|
|
excludes = []
|
|
|
|
includes = ["*.sh", "*.bash", "*.envrc", "*.envrc.*"]
|
|
|
|
options = ["-s", "-w", "-i", "2"]
|
|
|
|
|
2025-03-20 06:47:13 +01:00
|
|
|
[formatter.just]
|
|
|
|
command = "just"
|
|
|
|
includes = ["*.just"]
|
|
|
|
|
|
|
|
[formatter.taplo]
|
|
|
|
command = "taplo"
|
|
|
|
includes = ["*.toml"]
|
|
|
|
options = ["format"]
|
|
|
|
|
2025-03-19 22:25:52 +01:00
|
|
|
[formatter.nixfmt-rfc-style]
|
|
|
|
command = "nixfmt"
|
|
|
|
excludes = []
|
|
|
|
includes = ["*.nix"]
|
|
|
|
options = []
|