forked from hofbi/dev-tools
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
204 lines (202 loc) · 5.52 KB
/
.pre-commit-config.yaml
File metadata and controls
204 lines (202 loc) · 5.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
default_stages:
- pre-commit
ci:
autoupdate_commit_msg: 'chore(deps): pre-commit.ci autoupdate'
autoupdate_schedule: quarterly # We want to do updates via renovate since we can exclude hooks from being updated
autofix_commit_msg: 'style: pre-commit.ci fixes'
repos:
- repo: meta
hooks:
- id: check-hooks-apply
- id: check-useless-excludes
- repo: https://github.com/hofbi/dev-tools
rev: 1.4.0
hooks:
- id: check-sys-path-append
- id: check-sys-path-insert
- id: generate-hook-docs
- id: check-shellscript-set-options
- id: check-non-existing-and-duplicate-excludes
- id: sync-vscode-config
args:
- --verbose
- id: check-max-one-sentence-per-line
- repo: https://github.com/pre-commit/pre-commit
rev: v4.5.1
hooks:
- id: validate_manifest
- repo: https://github.com/pre-commit-ci/pre-commit-ci-config
rev: v1.6.1
hooks:
- id: check-pre-commit-ci-config
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: check-added-large-files
args:
- --maxkb=1024
- id: check-ast
- id: check-case-conflict
- id: check-docstring-first
- id: check-executables-have-shebangs
- id: check-illegal-windows-names
- id: check-json
exclude: |
(?x)^(
.devcontainer/devcontainer.json|
.vscode/
)
- id: check-merge-conflict
- id: check-shebang-scripts-are-executable
- id: check-toml
- id: check-vcs-permalinks
- id: debug-statements
- id: destroyed-symlinks
- id: detect-private-key
- id: end-of-file-fixer
- id: fix-byte-order-marker
- id: mixed-line-ending
args:
- --fix=lf
- id: name-tests-test
args:
- --pytest-test-first
- id: no-commit-to-branch
args:
- --branch
- master
- id: pretty-format-json
args:
- --autofix
exclude: |
(?x)^(
.devcontainer/devcontainer.json|
.vscode/
)
- id: trailing-whitespace
- repo: https://github.com/mattlqx/pre-commit-search-and-replace
rev: v1.1.9
hooks:
- id: search-and-replace
language_version: default # https://github.com/mattlqx/pre-commit-search-and-replace/issues/28
- repo: https://github.com/pre-commit/sync-pre-commit-deps
rev: v0.0.3
hooks:
- id: sync-pre-commit-deps
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.15.8
hooks:
- id: ruff-format
- id: ruff-check
- repo: https://github.com/astral-sh/uv-pre-commit
rev: 0.11.2
hooks:
- id: uv-lock
- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.10.0
hooks:
- id: python-check-blanket-noqa
- id: python-check-blanket-type-ignore
- id: python-check-mock-methods
- id: python-no-eval
- id: python-no-log-warn
- id: python-use-type-annotations
- id: text-unicode-replacement-char
- repo: https://github.com/PyCQA/autoflake
rev: v2.3.3
hooks:
- id: autoflake
- repo: https://github.com/MarcoGorelli/auto-walrus
rev: 0.4.1
hooks:
- id: auto-walrus
- repo: https://github.com/jumanjihouse/pre-commit-hooks
rev: 3.0.0
hooks:
- id: forbid-binary
always_run: true
- repo: https://github.com/pappasam/toml-sort
rev: v0.24.4
hooks:
- id: toml-sort-fix
exclude: "\\.lock$"
- repo: https://github.com/google/yamlfmt
rev: v0.21.0
hooks:
- id: yamlfmt
- repo: https://github.com/adrienverge/yamllint
rev: v1.38.0
hooks:
- id: yamllint
args:
- --strict
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.19.1
hooks:
- id: mypy
- repo: https://github.com/asottile/pyupgrade
rev: v3.21.2
hooks:
- id: pyupgrade
args:
- --py310-plus
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.37.1
hooks:
- id: check-github-workflows
- id: check-renovate
- repo: https://github.com/Mateusz-Grzelinski/actionlint-py
rev: v1.7.6.22
hooks:
- id: actionlint
additional_dependencies:
- pyflakes>=3.1.0
- shellcheck-py>=0.9.0.5
- repo: https://github.com/crate-ci/typos
rev: v1.44.0
hooks:
- id: typos
exclude_types:
- svg
- repo: https://github.com/executablebooks/mdformat
rev: 1.0.0
hooks:
- id: mdformat
additional_dependencies:
- linkify-it-py>=2.0.3
- mdformat-gfm>=1.0.0
# TODO: Enable - mdformat-myst>=0.2.2
- mdformat-shfmt>=0.2.0
- mdformat-config>=0.2.1
- mdformat-toc>=0.5.0
- repo: https://github.com/asottile/blacken-docs
rev: 1.20.0
hooks:
- id: blacken-docs
args:
- --line-length=120
- repo: https://github.com/tcort/markdown-link-check
rev: v3.14.2
hooks:
- id: markdown-link-check
args:
- "--quiet"
- "--config"
- ".md-link-config.json"
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.47.0
hooks:
- id: markdownlint
language_version: 22.14.0
args:
- "--dot"
- "--fix"
- repo: https://github.com/jendrikseipp/vulture
rev: v2.16
hooks:
- id: vulture
pass_filenames: true
- repo: https://github.com/google/keep-sorted
rev: v0.8.0
hooks:
- id: keep-sorted