This version is a little patch do to modification during pre-commit. Because you're not child and assume the consequence.
/!\ It's just a really quick hack. there is no safeguard. Can add option if some people is interested. Try to follow the release upstream automatically every night if there's one. I do not change the name of the package builded so it replace the initial one.
there is no release for now
- install with
pip install git+https://github.com/ethan-0l/pre-commit-pegi18.git
or git local
git clone https://github.com/ethan-0l/pre-commit-pegi18.git
cd pre-commit-pegi18
pip install .
poetry :
poetry add git+https://github.com/ethan-0l/pre-commit-pegi18.git
- Add allow_modifications: true to hook
- Add allow_return_nzero: true to hook <- use with more caution
- Add allow_return_codes: [1,2,3.....,42,...] <- 0 is always allowed. Usefull for hook that has proper handling of failure vs modification.
.pre-commit-config.yaml
- repo: https....
rev: v3.14.2
hooks:
- id: ...
args: []
stages:
- pre-commit
allow_modifications: trueou set PRE_COMMIT_ALLOW_MODIFICATIONS a true
$env:PRE_COMMIT_ALLOW_MODIFICATIONS="true"export PRE_COMMIT_ALLOW_MODIFICATIONS=truealso available : PRE_COMMIT_ALLOW_RETURN_NZERO
A framework for managing and maintaining multi-language pre-commit hooks.
For more information see: https://pre-commit.com/