mirror of
https://github.com/pre-commit/pre-commit-hooks.git
synced 2026-04-04 19:26:52 +00:00
Allow multiple branches to be protected
Original patch by @moas
This commit is contained in:
parent
2aa7aeb572
commit
baec308367
3 changed files with 22 additions and 9 deletions
|
|
@ -82,7 +82,10 @@ Add this to your `.pre-commit-config.yaml`
|
|||
- `name-tests-test` - Assert that files in tests/ end in `_test.py`.
|
||||
- Use `args: ['--django']` to match `test*.py` instead.
|
||||
- `no-commit-to-branch` - Protect specific branches from direct checkins.
|
||||
- Use `args: -b <branch> ` to set the branch. `master` is the default if no argument is set.
|
||||
- Use `args: [--branch <branch>]` to set the branch. `master` is the
|
||||
default if no argument is set.
|
||||
- `-b` / `--branch` may be specified multiple times to protect multiple
|
||||
branches.
|
||||
- `pyflakes` - Run pyflakes on your python files.
|
||||
- `pretty-format-json` - Checks that all your JSON files are pretty. "Pretty"
|
||||
here means that keys are sorted and indented. You can configure this with
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue