Skip to content

Commit 080a7bf

Browse files
authored
refactor!: use new stage names to silence pre-commit warning (#31)
pre-commit >= 3.2.0 is required now.
1 parent 58e7bbd commit 080a7bf

File tree

2 files changed

+12
-6
lines changed

2 files changed

+12
-6
lines changed

.pre-commit-hooks.yaml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
args: [-w, -s]
77
types: [shell]
88
exclude_types: [csh, tcsh, zsh]
9-
stages: [commit, merge-commit, push, manual]
9+
stages: [pre-commit, pre-merge-commit, pre-push, manual]
10+
minimum_pre_commit_version: 3.2.0 # for "stages" names
1011

1112
- id: shfmt-src
1213
name: shfmt
@@ -18,7 +19,8 @@
1819
args: [-w, -s]
1920
types: [shell]
2021
exclude_types: [csh, tcsh, zsh]
21-
stages: [commit, merge-commit, push, manual]
22+
stages: [pre-commit, pre-merge-commit, pre-push, manual]
23+
minimum_pre_commit_version: 3.2.0 # for "stages" names
2224

2325
- id: shfmt-docker
2426
name: shfmt
@@ -29,4 +31,5 @@
2931
args: [-w, -s]
3032
types: [shell]
3133
exclude_types: [csh, tcsh, zsh]
32-
stages: [commit, merge-commit, push, manual]
34+
stages: [pre-commit, pre-merge-commit, pre-push, manual]
35+
minimum_pre_commit_version: 3.2.0 # for "stages" names

tools/generate_pre_commit_hooks.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616
args: [-w, -s]
1717
types: [shell]
1818
exclude_types: [csh, tcsh, zsh]
19-
stages: [commit, merge-commit, push, manual]
19+
stages: [pre-commit, pre-merge-commit, pre-push, manual]
20+
minimum_pre_commit_version: 3.2.0 # for "stages" names
2021
2122
- id: shfmt-src
2223
name: shfmt
@@ -28,7 +29,8 @@
2829
args: [-w, -s]
2930
types: [shell]
3031
exclude_types: [csh, tcsh, zsh]
31-
stages: [commit, merge-commit, push, manual]
32+
stages: [pre-commit, pre-merge-commit, pre-push, manual]
33+
minimum_pre_commit_version: 3.2.0 # for "stages" names
3234
3335
- id: shfmt-docker
3436
name: shfmt
@@ -39,7 +41,8 @@
3941
args: [-w, -s]
4042
types: [shell]
4143
exclude_types: [csh, tcsh, zsh]
42-
stages: [commit, merge-commit, push, manual]
44+
stages: [pre-commit, pre-merge-commit, pre-push, manual]
45+
minimum_pre_commit_version: 3.2.0 # for "stages" names
4346
"""
4447

4548

0 commit comments

Comments
 (0)