You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
configuration file in a non-standard location to fetch configured
63
63
credentials from. Can be repeated multiple times.
64
64
-`--allow-missing-credentials` - Allow hook to pass when no credentials are
65
65
detected.
66
-
-`detect-private-key` - Checks for the existence of private keys.
67
-
-`double-quote-string-fixer` - This hook replaces double quoted strings
66
+
-<aname="detect-private-key">`detect-private-key`</a> - Checks for the existence of private keys.
67
+
-<aname="double-quote-string-fixer">`double-quote-string-fixer`</a> - This hook replaces double quoted strings
68
68
with single quoted strings.
69
-
-`end-of-file-fixer` - Makes sure files end in a newline and only a newline.
70
-
-`fix-encoding-pragma` - Add `# -*- coding: utf-8 -*-` to the top of python files.
69
+
-<aname="end-of-file-fixer">`end-of-file-fixer`</a> - Makes sure files end in a newline and only a newline.
70
+
-<aname="fix-encoding-pragma">`fix-encoding-pragma`</a> - Add `# -*- coding: utf-8 -*-` to the top of python files.
71
71
- To remove the coding pragma pass `--remove` (useful in a python3-only codebase)
72
-
-`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.
73
-
-`flake8` - Run flake8 on your python files.
74
-
-`forbid-new-submodules` - Prevent addition of new git submodules.
75
-
-`mixed-line-ending` - Replaces or checks mixed line ending.
72
+
-<aname="file-contents-sorter">`file-contents-sorter`</a> - 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.
73
+
-<aname="flake8">`flake8`</a> - Run flake8 on your python files.
74
+
-<aname="forbid-new-submodules">`forbid-new-submodules`</a> - Prevent addition of new git submodules.
75
+
-<aname="mixed-line-ending">`mixed-line-ending`</a> - Replaces or checks mixed line ending.
76
76
-`--fix={auto,crlf,lf,no}`
77
77
- `auto` - Replaces automatically the most frequent line ending. This is the default argument.
78
78
- `crlf`, `lf` - Forces to replace line ending by respectively CRLF and LF.
79
79
- This option isn't compatible with git setup check-in LF check-out CRLF as git smudge this later than the hook is invoked.
80
80
- `no` - Checks if there is any mixed line ending without modifying any file.
81
-
-`name-tests-test` - Assert that files in tests/ end in `_test.py`.
81
+
-<aname="name-tests-test">`name-tests-test`</a> - Assert that files in tests/ end in `_test.py`.
82
82
- Use `args: ['--django']` to match `test*.py` instead.
83
-
-`no-commit-to-branch` - Protect specific branches from direct checkins.
83
+
-<aname="no-commit-to-branch">`no-commit-to-branch`</a> - Protect specific branches from direct checkins.
84
84
- Use `args: [--branch, staging, --branch, master]` to set the branch.
85
85
`master` is the default if no branch argument is set.
86
86
-`-b` / `--branch` may be specified multiple times to protect multiple
87
87
branches.
88
88
-`-p` / `--pattern` can be used to protect branches that match a supplied regex
89
89
(e.g. `--pattern, release/.*`). May be specified multiple times.
90
-
-`pretty-format-json` - Checks that all your JSON files are pretty. "Pretty"
90
+
-<aname="pretty-format-json">`pretty-format-json`</a> - Checks that all your JSON files are pretty. "Pretty"
91
91
here means that keys are sorted and indented. You can configure this with
92
92
the following commandline options:
93
93
-`--autofix` - automatically format json files
94
94
-`--indent ...` - Control the indentation (either a number for a number of spaces or a string of whitespace). Defaults to 4 spaces.
95
95
-`--no-ensure-ascii` preserve unicode characters instead of converting to escape sequences
96
96
-`--no-sort-keys` - when autofixing, retain the original key ordering (instead of sorting the keys)
97
97
-`--top-keys comma,separated,keys` - Keys to keep at the top of mappings.
98
-
-`requirements-txt-fixer` - Sorts entries in requirements.txt and removes incorrect entry for `pkg-resources==0.0.0`
99
-
-`sort-simple-yaml` - Sorts simple YAML files which consist only of top-level
98
+
-<aname="requirements-txt-fixer">`requirements-txt-fixer`</a> - Sorts entries in requirements.txt and removes incorrect entry for `pkg-resources==0.0.0`
99
+
-<aname="sort-simple-yaml">`sort-simple-yaml`</a> - Sorts simple YAML files which consist only of top-level
100
100
keys, preserving comments and blocks.
101
101
102
102
Note that `sort-simple-yaml` by default matches no `files` as it enforces a
@@ -108,7 +108,7 @@ Add this to your `.pre-commit-config.yaml`
0 commit comments