mirror of
https://github.com/pre-commit/pre-commit-hooks.git
synced 2026-04-06 12:06:53 +00:00
Add new byte-order-marker checker/fixer
This commit is contained in:
parent
5bd9e74adf
commit
d18bd5b75f
5 changed files with 56 additions and 5 deletions
|
|
@ -42,9 +42,6 @@ Require literal syntax when initializing empty or zero Python builtin types.
|
|||
- Ignore this requirement for specific builtin types with `--ignore=type1,type2,…`.
|
||||
- Forbid `dict` keyword syntax with `--no-allow-dict-kwargs`.
|
||||
|
||||
#### `check-byte-order-marker`
|
||||
Forbid files which have a UTF-8 byte-order marker
|
||||
|
||||
#### `check-case-conflict`
|
||||
Check for files with names that would conflict on a case-insensitive filesystem like MacOS HFS+ or Windows FAT.
|
||||
|
||||
|
|
@ -102,6 +99,9 @@ This hook replaces double quoted strings with single quoted strings.
|
|||
#### `end-of-file-fixer`
|
||||
Makes sure files end in a newline and only a newline.
|
||||
|
||||
#### `fix-byte-order-marker`
|
||||
removes UTF-8 byte order marker
|
||||
|
||||
#### `fix-encoding-pragma`
|
||||
Add `# -*- coding: utf-8 -*-` to the top of python files.
|
||||
- To remove the coding pragma pass `--remove` (useful in a python3-only codebase)
|
||||
|
|
@ -183,6 +183,7 @@ Trims trailing whitespace.
|
|||
[mirrors-autopep8](https://github.com/pre-commit/mirrors-autopep8)
|
||||
- `pyflakes`: instead use `flake8`
|
||||
- `flake8`: instead use [upstream flake8](https://gitlab.com/pycqa/flake8)
|
||||
- `check-byte-order-marker`: instead use fix-byte-order-marker
|
||||
|
||||
### As a standalone package
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue