feat(depotfmt): enforce editorconfig

Change-Id: Id2c1e5e8f26d7022978e3b0053394d7edc423875
Reviewed-on: https://cl.snix.dev/c/snix/+/30233
Autosubmit: Paul Meyer <katexochen0@gmail.com>
Tested-by: besadii
Reviewed-by: Florian Klink <flokli@flokli.de>
Reviewed-by: Paul Meyer <katexochen0@gmail.com>
This commit is contained in:
Paul Meyer 2025-03-21 13:28:15 +01:00 committed by clbot
parent bfd948c6e2
commit af96ef21c9

View file

@ -20,6 +20,44 @@ let
command = "${pkgs.rustfmt}/bin/rustfmt"
options = ["--edition", "2021"]
includes = [ "*.rs" ]
[formatter.editorconfig]
command = "${pkgs.editorconfig-checker}/bin/editorconfig-checker"
includes = [
"*.c",
"*.conf",
"*.css",
"*.exp",
"*.go",
"*.h",
"*.hcl",
"*.html",
"*.java",
"*.jq",
"*.js",
"*.json",
"*.md",
"*.nix",
"*.proto",
"*.py",
"*.rs",
"*.scm",
"*.scss",
"*.sh",
"*.tf",
"*.toml",
"*.txt",
"*.xml",
"*.yaml",
"*.yml"
]
excludes = [
"snix/eval/src/tests/nix_tests/*",
# contains "References: ", which has trailing whitespace
# FUTUREWORK: move into separate fixture and read from here
"snix/nix-compat/src/narinfo/mod.rs"
]
'';
# helper tool for formatting the depot interactively