1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-25 02:21:16 +02:00

dev: Configure nixfmt (rfc style)

This commit is contained in:
Robert Hensing 2025-01-24 13:16:36 +01:00
parent 99dbcca5f1
commit ba6425a7d0
5 changed files with 114 additions and 3 deletions

View file

@ -31,6 +31,35 @@
touch $out
''}";
};
nixfmt-rfc-style = {
enable = true;
package = inputs.nixfmt.packages.${pkgs.hostPlatform.system}.default;
excludes = [
# Invalid
''^tests/functional/lang/parse-.*\.nix$''
# Formatting-sensitive
''^tests/functional/lang/eval-okay-curpos\.nix$''
''^tests/functional/lang/.*comment.*\.nix$''
''^tests/functional/lang/.*newline.*\.nix$''
''^tests/functional/lang/.*eol.*\.nix$''
# Syntax tests
''^tests/functional/shell.shebang\.nix$''
''^tests/functional/lang/eval-okay-ind-string\.nix$''
# Not supported by nixfmt
''^tests/functional/lang/eval-okay-deprecate-cursed-or\.nix$''
''^tests/functional/lang/eval-okay-attrs5\.nix$''
# More syntax tests
# These tests, or parts of them, should have been parse-* test cases.
''^tests/functional/lang/eval-fail-eol-2\.nix$''
''^tests/functional/lang/eval-fail-path-slash\.nix$''
''^tests/functional/lang/eval-fail-toJSON-non-utf-8\.nix$''
''^tests/functional/lang/eval-fail-set\.nix$''
];
};
clang-format = {
enable = true;
# https://github.com/cachix/git-hooks.nix/pull/532
@ -660,7 +689,6 @@
''^src/libutil-tests/data/git/check-data\.sh$''
];
};
# TODO: nixfmt, https://github.com/NixOS/nixfmt/issues/153
};
};
};