Skip to content

Commit

Permalink
Merge pull request #522 from r-vdp/master
Browse files Browse the repository at this point in the history
fix: avoid use of deprecated stage names
  • Loading branch information
sandydoo authored Oct 30, 2024
2 parents 8517a0c + b3ff86f commit af8a16f
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ nix develop
pre-commit-check = nix-pre-commit-hooks.run {
src = ./.;
# If your hooks are intrusive, avoid running on each commit with a default_states like this:
# default_stages = ["manual" "push"];
# default_stages = ["manual" "pre-push"];
hooks = {
elm-format.enable = true;
Expand Down
8 changes: 4 additions & 4 deletions modules/hooks.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2047,7 +2047,7 @@ in
description = "Prevent very large files to be committed (e.g. binaries).";
package = tools.pre-commit-hooks;
entry = "${hooks.check-added-large-files.package}/bin/check-added-large-files";
stages = [ "commit" "push" "manual" ];
stages = [ "pre-commit" "pre-push" "manual" ];
};
check-builtin-literals =
{
Expand Down Expand Up @@ -2080,7 +2080,7 @@ in
package = tools.pre-commit-hooks;
entry = "${hooks.check-executables-have-shebangs.package}/bin/check-executables-have-shebangs";
types = [ "text" "executable" ];
stages = [ "commit" "push" "manual" ];
stages = [ "pre-commit" "pre-push" "manual" ];
};
check-json =
{
Expand Down Expand Up @@ -2113,7 +2113,7 @@ in
package = tools.pre-commit-hooks;
entry = "${hooks.check-shebang-scripts-are-executable.package}/bin/check-shebang-scripts-are-executable";
types = [ "text" ];
stages = [ "commit" "push" "manual" ];
stages = [ "pre-commit" "pre-push" "manual" ];
};
check-symlinks =
{
Expand Down Expand Up @@ -3700,7 +3700,7 @@ lib.escapeShellArgs (lib.concatMap (ext: [ "--ghc-opt" "-X${ext}" ]) hooks.ormol
name = "trim-trailing-whitespace";
description = "Trim trailing whitespace.";
types = [ "text" ];
stages = [ "commit" "push" "manual" ];
stages = [ "pre-commit" "pre-push" "manual" ];
package = tools.pre-commit-hooks;
entry = "${hooks.trim-trailing-whitespace.package}/bin/trailing-whitespace-fixer";
};
Expand Down
2 changes: 1 addition & 1 deletion nix/installation-test.nix
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ let
expectedHooks = [ "pre-push" ];
conf.hooks.nixpkgs-fmt = {
enable = true;
stages = [ "push" ];
stages = [ "pre-push" ];
};
};
};
Expand Down
2 changes: 1 addition & 1 deletion nix/run.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ builtinStuff@{ pkgs, tools, isFlakes, pre-commit, git, runCommand, writeText, wr
, hooks ? { }
, excludes ? [ ]
, tools ? { }
, default_stages ? [ "commit" ]
, default_stages ? [ "pre-commit" ]
, addGcRoot ? true
, imports ? [ ]
}:
Expand Down

0 comments on commit af8a16f

Please sign in to comment.