feat(pre-commit): Switch to pre-push stage for linters

This commit is contained in:
Tom Hubrecht 2024-09-12 20:13:31 +02:00
parent 99825b89ca
commit 9174965f28
Signed by: thubrecht
SSH key fingerprint: SHA256:r+nK/SIcWlJ0zFZJGHtlAoRwq1Rm+WcKAm5ADYMoQPc
2 changed files with 19 additions and 6 deletions

View file

@ -8,4 +8,4 @@ jobs:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- name: Run pre-commit on all files - name: Run pre-commit on all files
run: nix-shell --run 'pre-commit run --all-files --show-diff-on-failure' -A shells.pre-commit ./. run: nix-shell --run 'pre-commit run --all-files --hook-stage pre-push --show-diff-on-failure' -A shells.pre-commit ./.

View file

@ -45,12 +45,25 @@ let
src = ./.; src = ./.;
hooks = { hooks = {
# Nix Hooks statix = {
statix.enable = true; enable = true;
deadnix.enable = true; stages = [ "pre-push" ];
nixfmt-rfc-style.enable = true; settings.ignore = [
"lon.nix"
"**/npins"
];
};
deadnix = {
enable = true;
stages = [ "pre-push" ];
};
nixfmt-rfc-style = {
enable = true;
stages = [ "pre-push" ];
};
# Misc Hooks
commitizen.enable = true; commitizen.enable = true;
}; };
}; };