mirror of
https://github.com/pre-commit/pre-commit-hooks.git
synced 2026-04-05 03:26:53 +00:00
Fix #518, provide --enforce-all option to check_added_large_files
The --enforce-all option when provided ensures that all files passed on the command line are checked against the size limit. Default behaviour remains unchanged.
This commit is contained in:
parent
31d41ff291
commit
012bb0691f
3 changed files with 47 additions and 4 deletions
|
|
@ -26,8 +26,11 @@ Add this to your `.pre-commit-config.yaml`
|
|||
#### `check-added-large-files`
|
||||
Prevent giant files from being committed.
|
||||
- Specify what is "too large" with `args: ['--maxkb=123']` (default=500kB).
|
||||
- Limits checked files to those indicated as staged for addition by git.
|
||||
- If `git-lfs` is installed, lfs files will be skipped
|
||||
(requires `git-lfs>=2.2.1`)
|
||||
- `--enforce-all` - Check all listed files not just those staged for
|
||||
addition.
|
||||
|
||||
#### `check-ast`
|
||||
Simply check whether files parse as valid python.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue