mirror of
https://github.com/pre-commit/pre-commit-hooks.git
synced 2026-04-07 20:26:54 +00:00
Add mixed-line-ending hook
This commit is contained in:
parent
78dffcc819
commit
fc8a5b27e9
6 changed files with 388 additions and 0 deletions
|
|
@ -58,6 +58,11 @@ Add this to your `.pre-commit-config.yaml`
|
|||
- `file-contents-sorter` - Sort the lines in specified files (defaults to alphabetical). You must provide list of target files as input to it. Note that this hook WILL remove blank lines and does NOT respect any comments.
|
||||
- `flake8` - Run flake8 on your python files.
|
||||
- `forbid-new-submodules` - Prevent addition of new git submodules.
|
||||
- `mixed-line-ending` - Replaces or checks mixed line ending.
|
||||
- `--fix={auto,crlf,lf,no}`
|
||||
- `auto` - Replaces automatically the most frequent line ending. This is the default argument.
|
||||
- `crlf`, `lf` - Forces to replace line ending by respectively CRLF and LF.
|
||||
- `no` - Checks if there is any mixed line ending without modifying any file.
|
||||
- `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.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue