File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -132,6 +132,13 @@ Protect specific branches from direct checkins.
132
132
- ` -p ` / ` --pattern ` can be used to protect branches that match a supplied regex
133
133
(e.g. ` --pattern, release/.* ` ). May be specified multiple times.
134
134
135
+ Note that ` no-commit-to-branch ` is configured by default to [ ` always_run ` ] ( https://pre-commit.com/#config-always_run ) .
136
+ As a result, it will ignore any setting of [ ` files ` ] ( https://pre-commit.com/#config-files ) ,
137
+ [ ` exclude ` ] ( https://pre-commit.com/#config-exclude ) , [ ` types ` ] ( https://pre-commit.com/#config-types )
138
+ or [ ` exclude_types ` ] ( https://pre-commit.com/#config-exclude_types ) .
139
+ Set [ ` always_run: false ` ] ( https://pre-commit.com/#config-always_run ) to allow this hook to be skipped according to these
140
+ file filters. Caveat: In this configuration, empty commits (` git commit --allow-empty ` ) would always be allowed by this hook.
141
+
135
142
#### ` pretty-format-json `
136
143
Checks that all your JSON files are pretty. "Pretty"
137
144
here means that keys are sorted and indented. You can configure this with
@@ -150,7 +157,7 @@ Sorts simple YAML files which consist only of top-level
150
157
keys, preserving comments and blocks.
151
158
152
159
Note that ` sort-simple-yaml ` by default matches no ` files ` as it enforces a
153
- very specific format. You must opt in to this by setting ` files ` , for example:
160
+ very specific format. You must opt in to this by setting [ ` files ` ] ( https://pre-commit.com/#config-files ) , for example:
154
161
155
162
``` yaml
156
163
- id : sort-simple-yaml
You can’t perform that action at this time.
0 commit comments