Skip to content

Commit 531a237

Browse files
author
Anis
committed
docs(readme): add default_stages example
1 parent 58459fc commit 531a237

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

README.md

+5-4
Original file line numberDiff line numberDiff line change
@@ -253,17 +253,18 @@ If you are using [pre-commit](https://pre-commit.com/) in you repository, you ca
253253

254254
Into `.pre-commit-config.yaml`:
255255
```yaml
256-
...
256+
default_stages: [commit]
257257
repos:
258-
...
259-
- repo: https://github.com/lumapps/commit-message-validator
258+
- repo: https://github.com/lumapps/commit-message-validator
260259
rev: master
261260
hooks:
262261
- id: commit-message-validator
263262
stages: [commit-msg]
264263
args: [--allow-temp]
265-
...
266264
```
265+
266+
`default_stages` tells which stage to install hooks that do not specify a `stages` option.
267+
267268
Then run `pre-commit install --hook-type commit-msg` to install the `commit-message-validator`
268269

269270
### OPTIONS

0 commit comments

Comments
 (0)