mirror of
https://github.com/pre-commit/pre-commit-hooks.git
synced 2026-04-05 19:46:54 +00:00
Merge 97a00d0324 into 78818b90cd
This commit is contained in:
commit
e271a21735
12 changed files with 271 additions and 0 deletions
|
|
@ -66,6 +66,12 @@ Add this to your `.pre-commit-config.yaml`
|
|||
- `--indent ...` - Control the indentation (either a number for a number of spaces or a string of whitespace). Defaults to 4 spaces.
|
||||
- `--no-sort-keys` - when autofixing, retain the original key ordering (instead of sorting the keys)
|
||||
- `--top-keys comma,separated,keys` - Keys to keep at the top of mappings.
|
||||
- `pretty-format-yaml` - Checks that all your YAML files are pretty. "Pretty"
|
||||
here means that keys are sorted and indented. You can configure this with
|
||||
the following commandline options:
|
||||
- `--autofix` - automatically format yaml files
|
||||
- `--default_style`, `--default_flow_style`, `--canonical`, `--indent`, `--width`, `--allow_unicode`, `--line_break`, `--encoding`, `--explicit_start`, `--explicit_end`, `--version`, `--tags` - define how a pretty YAML file looks like.
|
||||
The parameters are passed as kwargs into yaml.safe_dump method provided by [pyyaml package](http://pyyaml.org/wiki/PyYAMLDocumentation). Our suggestion of pretty YAML file is `-indent=4 --default_flow_style=False`.
|
||||
- `requirements-txt-fixer` - Sorts entries in requirements.txt
|
||||
- `trailing-whitespace` - Trims trailing whitespace.
|
||||
- Markdown linebreak trailing spaces preserved for `.md` and`.markdown`;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue