-
Notifications
You must be signed in to change notification settings - Fork 173
feat: support specifying stages, close #49 #79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
unrelated: pre-commit does append to path and not override existing pre-commit
beware I'm hitting this: (from an earlier contribution about shellcheck detection) $ pre-commit run --all --hook-stage manual generate
An error has occurred: InvalidConfigError:
==> File .pre-commit-config.yaml
==> At Config()
==> At key: repos
==> At Repository(repo='local')
==> At key: hooks
==> At Hook(id='shellcheck')
==> At key: types
==> At index 1
=====> Type tag 'ash' is not recognized. Try upgrading identify and pre-commit?
Check the log at /home/blaggacao/.cache/pre-commit/pre-commit.log
$ pre-commit --version
pre-commit 2.5.1 builtins.fetchTarball {
# git ls-remote https://github.com/nixos/nixpkgs nixpkgs-unstable
# unstable
url = "https://github.com/nixos/nixpkgs/tarball/26d3fbf21563c52f124551eb60dec5ea17ade8fa";
sha256 = "sha256:08xhvfnwy60yyyhkddg7lknm9g7w2pg6lkyha5kfkg98c09f1p10";
} (from today) |
fdfa7a3
to
eff2d0d
Compare
fi | ||
case $stage in | ||
# if you amend these switches please also review $hooks above | ||
commit | merge-commit | push) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we diverge from pre-commit settings by not just specifying pre-push instead of push?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Precommit has two identifiers "push" (the stage) and "pre-push" (the hook) in an attempt to be extra "correct" about things, while achieving only plain confusion. Here it's "push" (the stage).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ps: I also wondered and got bitten. More than once.
Co-authored-by: Domen Kožar <[email protected]>
replace #52 (rebased & squashed)