Skip to content

Commit d1f459b

Browse files
committed
Switch to builtin prek hooks where possible
Signed-off-by: Matt Norton <matt@carrotmanmatt.com>
1 parent cf17f0e commit d1f459b

1 file changed

Lines changed: 15 additions & 14 deletions

File tree

‎.pre-commit-config.yaml‎

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -83,26 +83,18 @@ repos:
8383
- id: gitlint
8484
- id: gitlint-ci
8585

86-
- repo: https://github.com/pre-commit/pre-commit-hooks
87-
rev: v6.0.0
88-
hooks:
89-
- id: check-illegal-windows-names
90-
- id: check-shebang-scripts-are-executable
91-
- id: check-vcs-permalinks
92-
- id: destroyed-symlinks
93-
- id: check-case-conflict
94-
- id: name-tests-test
95-
args: [--pytest-test-first]
96-
files: (?:^|\/)tests\/(?:[^\/]+\/)*(?!_)[^\/]+\.py$ # yamllint disable-line rule:key-ordering
97-
- id: pretty-format-json
98-
args: [--autofix, --indent, "4"]
99-
10086
- repo: builtin
10187
hooks:
88+
- id: check-case-conflict
89+
- id: destroyed-symlinks
90+
- id: check-vcs-permalinks
10291
- id: check-added-large-files
92+
- id: check-illegal-windows-names
93+
- id: check-shebang-scripts-are-executable
10394
- id: trailing-whitespace
10495
- id: check-executables-have-shebangs
10596
- id: check-json
97+
- id: check-jsonc
10698
- id: check-toml
10799
- id: check-yaml
108100
- id: end-of-file-fixer
@@ -113,6 +105,15 @@ repos:
113105
args: [--fix=lf]
114106
- id: detect-private-key
115107
- id: fix-byte-order-marker
108+
- id: pretty-format-json
109+
args: [--autofix, --indent, "4"]
110+
- id: require-filename-pattern
111+
args:
112+
- "^test_.*\.py$"
113+
- "^__init__\.py$"
114+
- "^conftest\.py$"
115+
- "^_.*\.py$"
116+
files: "(^|/)tests/.+\.py$"
116117

117118
- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
118119
rev: v2.16.0

0 commit comments

Comments
 (0)