Skip to content

Commit aa5a326

Browse files
committed
chore(pre-commit): make use of default_stages in commit
So we don't have to repeat `stages: [commit]` for almost all checks.
1 parent c7dcf40 commit aa5a326

File tree

1 file changed

+2
-13
lines changed

1 file changed

+2
-13
lines changed

.pre-commit-config.yaml

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
default_stages: [commit]
2+
13
repos:
24

35
- repo: https://github.com/jorisroovers/gitlint
@@ -17,7 +19,6 @@ repos:
1719
types: [text]
1820
files: ^(bash_completion|completions/.+|test/(config/bashrc|update-test-cmd-list)|.+\.sh(\.in)?)$
1921
exclude: ^completions/(\.gitignore|Makefile.*)$
20-
stages: [commit]
2122

2223
- repo: https://github.com/shellcheck-py/shellcheck-py
2324
rev: v0.7.2.1
@@ -28,7 +29,6 @@ repos:
2829
files: ^(bash_completion|completions/.+|test/(config/bashrc|update-test-cmd-list)|.+\.sh(\.in)?)$
2930
exclude: ^completions/(\.gitignore|Makefile.*)$
3031
require_serial: false # We disable SC1090 anyway, so parallel is ok
31-
stages: [commit]
3232

3333
- repo: local
3434
hooks:
@@ -38,7 +38,6 @@ repos:
3838
entry: test/update-test-cmd-list
3939
files: ^test/t/.+\.py$
4040
pass_filenames: false
41-
stages: [commit]
4241

4342
- repo: https://github.com/psf/black
4443
rev: 21.7b0
@@ -47,7 +46,6 @@ repos:
4746
types: [text]
4847
files: ^(helpers/python|.+\.py)$
4948
exclude: ^completions/
50-
stages: [commit]
5149

5250
- repo: https://github.com/PyCQA/flake8
5351
rev: 3.9.2
@@ -66,14 +64,12 @@ repos:
6664
types: [text]
6765
files: ^(helpers/python|.+\.py)$
6866
exclude: ^completions/
69-
stages: [commit]
7067

7168
- repo: https://github.com/PyCQA/isort
7269
rev: 5.9.3
7370
hooks:
7471
- id: isort
7572
args: [--filter-files, --settings-path=test/setup.cfg]
76-
stages: [commit]
7773

7874
- repo: local
7975
hooks:
@@ -88,23 +84,20 @@ repos:
8884
types: [python]
8985
# Intentionally not run on helpers/python (we support very old versions)
9086
exclude: ^completions/|^test/fixtures/pytest/
91-
stages: [commit]
9287

9388
- repo: https://github.com/asottile/pyupgrade
9489
rev: v2.24.0
9590
hooks:
9691
- id: pyupgrade
9792
args: [--py36-plus, --keep-percent-format]
9893
exclude: ^completions/
99-
stages: [commit]
10094

10195
- repo: https://github.com/perltidy/perltidy
10296
rev: "20210717"
10397
hooks:
10498
- id: perltidy
10599
types: [text]
106100
files: ^(helpers/perl|.+\.p[ml])$
107-
stages: [commit]
108101

109102
- repo: local
110103
hooks:
@@ -116,24 +109,20 @@ repos:
116109
args: [--quiet, --verbose, "5"]
117110
types: [text]
118111
files: ^(helpers/perl|.+\.p[ml])$
119-
stages: [commit]
120112

121113
- repo: https://github.com/igorshubovych/markdownlint-cli
122114
rev: v0.28.1
123115
hooks:
124116
- id: markdownlint
125117
exclude: ^CHANGELOG\.md$
126-
stages: [commit]
127118

128119
- repo: https://github.com/pre-commit/pre-commit-hooks
129120
rev: v4.0.1
130121
hooks:
131122
- id: check-case-conflict
132-
stages: [commit]
133123

134124
- repo: https://github.com/crate-ci/typos
135125
rev: v1.0.11
136126
hooks:
137127
- id: typos
138128
exclude: ^(CHANGELOG\.md|test/(test-cmd-list\.txt|fixtures/.+))$
139-
stages: [commit]

0 commit comments

Comments
 (0)