flake: add nixf-diagnose to treefmt

Start off conservative ignoring more things. Handle the simple auto-fix
things initially.

Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
This commit is contained in:
Austin Horstman
2025-12-28 10:44:39 -06:00
parent a2cc7b0bab
commit 9fff37e6ff
2 changed files with 11 additions and 0 deletions

View File

@@ -57,6 +57,7 @@
nixfmt
deadnix
keep-sorted
nixf-diagnose
];
settings = pkgs.lib.importTOML ./treefmt.toml;
}

View File

@@ -10,6 +10,16 @@ command = "deadnix"
options = [ "--edit", "--no-lambda-arg", "--no-lambda-pattern-names" ]
includes = [ "*.nix" ]
[formatter.nixf-diagnose]
command = "nixf-diagnose"
options = [
"--auto-fix",
"--ignore=sema-unused-def-lambda-witharg-formal",
"--ignore=sema-unused-def-lambda-noarg-formal",
"--ignore=sema-primop-overridden"
]
includes = [ "*.nix" ]
[formatter.keep-sorted]
command = "keep-sorted"
includes = [ "*" ]