diff --git a/flake.nix b/flake.nix index 96e572f40..30d8d7781 100644 --- a/flake.nix +++ b/flake.nix @@ -57,6 +57,7 @@ nixfmt deadnix keep-sorted + nixf-diagnose ]; settings = pkgs.lib.importTOML ./treefmt.toml; } diff --git a/treefmt.toml b/treefmt.toml index cab0579db..d48c45508 100644 --- a/treefmt.toml +++ b/treefmt.toml @@ -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 = [ "*" ]