forked from DGNum/infrastructure
feat(pre-commit): Switch to pre-push stage for linters
This commit is contained in:
parent
99825b89ca
commit
9174965f28
2 changed files with 19 additions and 6 deletions
|
@ -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 ./.
|
||||||
|
|
23
default.nix
23
default.nix
|
@ -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;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue