Skip to content

Commit af8a16f

Browse files
authored
Merge pull request #522 from r-vdp/master
fix: avoid use of deprecated stage names
2 parents 8517a0c + b3ff86f commit af8a16f

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ nix develop
8888
pre-commit-check = nix-pre-commit-hooks.run {
8989
src = ./.;
9090
# If your hooks are intrusive, avoid running on each commit with a default_states like this:
91-
# default_stages = ["manual" "push"];
91+
# default_stages = ["manual" "pre-push"];
9292
hooks = {
9393
elm-format.enable = true;
9494

modules/hooks.nix

+4-4
Original file line numberDiff line numberDiff line change
@@ -2047,7 +2047,7 @@ in
20472047
description = "Prevent very large files to be committed (e.g. binaries).";
20482048
package = tools.pre-commit-hooks;
20492049
entry = "${hooks.check-added-large-files.package}/bin/check-added-large-files";
2050-
stages = [ "commit" "push" "manual" ];
2050+
stages = [ "pre-commit" "pre-push" "manual" ];
20512051
};
20522052
check-builtin-literals =
20532053
{
@@ -2080,7 +2080,7 @@ in
20802080
package = tools.pre-commit-hooks;
20812081
entry = "${hooks.check-executables-have-shebangs.package}/bin/check-executables-have-shebangs";
20822082
types = [ "text" "executable" ];
2083-
stages = [ "commit" "push" "manual" ];
2083+
stages = [ "pre-commit" "pre-push" "manual" ];
20842084
};
20852085
check-json =
20862086
{
@@ -2113,7 +2113,7 @@ in
21132113
package = tools.pre-commit-hooks;
21142114
entry = "${hooks.check-shebang-scripts-are-executable.package}/bin/check-shebang-scripts-are-executable";
21152115
types = [ "text" ];
2116-
stages = [ "commit" "push" "manual" ];
2116+
stages = [ "pre-commit" "pre-push" "manual" ];
21172117
};
21182118
check-symlinks =
21192119
{
@@ -3700,7 +3700,7 @@ lib.escapeShellArgs (lib.concatMap (ext: [ "--ghc-opt" "-X${ext}" ]) hooks.ormol
37003700
name = "trim-trailing-whitespace";
37013701
description = "Trim trailing whitespace.";
37023702
types = [ "text" ];
3703-
stages = [ "commit" "push" "manual" ];
3703+
stages = [ "pre-commit" "pre-push" "manual" ];
37043704
package = tools.pre-commit-hooks;
37053705
entry = "${hooks.trim-trailing-whitespace.package}/bin/trailing-whitespace-fixer";
37063706
};

nix/installation-test.nix

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ let
5454
expectedHooks = [ "pre-push" ];
5555
conf.hooks.nixpkgs-fmt = {
5656
enable = true;
57-
stages = [ "push" ];
57+
stages = [ "pre-push" ];
5858
};
5959
};
6060
};

nix/run.nix

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ builtinStuff@{ pkgs, tools, isFlakes, pre-commit, git, runCommand, writeText, wr
55
, hooks ? { }
66
, excludes ? [ ]
77
, tools ? { }
8-
, default_stages ? [ "commit" ]
8+
, default_stages ? [ "pre-commit" ]
99
, addGcRoot ? true
1010
, imports ? [ ]
1111
}:

0 commit comments

Comments
 (0)