File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -94,7 +94,18 @@ Add this to your `.pre-commit-config.yaml`
9494 - ` --no-sort-keys ` - when autofixing, retain the original key ordering (instead of sorting the keys)
9595 - ` --top-keys comma,separated,keys ` - Keys to keep at the top of mappings.
9696- ` requirements-txt-fixer ` - Sorts entries in requirements.txt and removes incorrect entry for ` pkg-resources==0.0.0 `
97- - ` sort-simple-yaml ` - Sorts simple YAML files which consist only of top-level keys, preserving comments and blocks.
97+ - ` sort-simple-yaml ` - Sorts simple YAML files which consist only of top-level
98+ keys, preserving comments and blocks.
99+
100+ Note that ` sort-simple-yaml ` by default matches no ` files ` as it enforces a
101+ very specific format. You must opt in to this by setting ` files ` , for
102+ example:
103+
104+ ``` yaml
105+ - id : sort-simple-yaml
106+ files : ^config/simple/
107+ ` ` `
108+
98109- ` trailing-whitespace` - Trims trailing whitespace.
99110 - To preserve Markdown [hard linebreaks](https://github.github.com/gfm/#hard-line-break)
100111 use `args : [--markdown-linebreak-ext=md]` (or other extensions used
You can’t perform that action at this time.
0 commit comments