-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.pre-commit-config.yaml
293 lines (265 loc) · 8.65 KB
/
.pre-commit-config.yaml
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
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
---
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
exclude: ^3rd-party|COPYING|.gitmodules|conan
default_language_version:
python: python3
fail_fast: true
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
hooks:
- id: check-added-large-files
args: [--maxkb=150]
- id: check-ast
- id: check-byte-order-marker
exclude: ^.*(\.cbproj|\.groupproj|\.props|\.sln|\.vcxproj|\.vcxproj.filters)$
- id: check-builtin-literals
- id: check-case-conflict
- id: check-docstring-first
- id: check-executables-have-shebangs
- id: check-json
exclude: .vscode/*
- id: pretty-format-json
args: [--autofix]
exclude: .vscode/*
- id: check-merge-conflict
- id: check-shebang-scripts-are-executable
- id: check-symlinks
- id: check-toml
- id: check-vcs-permalinks
- id: check-xml
- id: check-yaml
args: [--allow-multiple-documents]
exclude: >
(?x)(
^\.gitlab/.*\.yml|
^\.gitlab/ci/.*\.yml|
^\.clang-format$
)$
- id: debug-statements
- id: destroyed-symlinks
- id: detect-private-key
- id: double-quote-string-fixer
- id: end-of-file-fixer
stages:
- commit
- manual
- id: file-contents-sorter
- id: fix-byte-order-marker
exclude: ^.*(\.cbproj|\.groupproj|\.props|\.sln|\.vcxproj|\.vcxproj.filters)$
- id: fix-encoding-pragma
- id: forbid-new-submodules
- id: mixed-line-ending
args: [--fix=auto]
- id: name-tests-test
- id: no-commit-to-branch
args: [--branch, gh-pages]
- id: requirements-txt-fixer
- id: sort-simple-yaml
- id: trailing-whitespace
args: [--markdown-linebreak-ext=md]
stages:
- commit
- manual
- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.9.0 # Use the ref you want to point at
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: rst-backticks
- id: rst-directive-colons
- id: rst-inline-touching-normal
- id: text-unicode-replacement-char
- repo: https://github.com/asottile/add-trailing-comma
rev: v2.2.1
hooks:
- id: add-trailing-comma
- repo: https://github.com/asottile/blacken-docs
rev: v1.12.0
hooks:
- id: blacken-docs
additional_dependencies: [black==21.7b0]
- repo: https://github.com/jumanjihouse/pre-commit-hooks
rev: 2.1.4
hooks:
- id: bundler-audit
- id: check-mailmap
- id: fasterer
- id: forbid-binary
exclude: >
(?x)^(
.+\.bmp|
.+\.BMP|
.+\.png|
.+\.pdf|
.+\.woff|
.+\.woff2|
.+\.tff|
.+\.ico|
.+\.icns|
.+\.svgz|
.+\.ttf
)$
- id: git-check # Configure in .gitattributes
- id: git-dirty # Configure in .gitignore
- id: markdownlint # Configure in .mdlrc
- id: reek
- id: rubocop
- id: script-must-not-have-extension
name: Local policy is to exclude extension from all shell files
types: [shell]
- id: script-must-not-have-extension
name: Executable Ruby scripts must not have a file extension
types: [ruby, executable]
- id: shellcheck
args:
[
"--color=always",
"--shell=bash",
"-x",
"-a",
"--exclude=SC1090",
]
additional_dependencies: [shellcheck]
- id: shfmt
- repo: https://github.com/jumanjihouse/pre-commit-hook-yamlfmt
rev: 0.1.0 # or specific tag
hooks:
- id: yamlfmt
args: [--preserve-quotes]
- repo: https://github.com/Lucas-C/pre-commit-hooks-go
rev: v1.0.1
hooks:
- id: checkmake
- repo: https://github.com/Lucas-C/pre-commit-hooks-java
rev: 1.3.10
hooks:
- id: validate-html
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.1.10
hooks:
- id: remove-crlf
- id: forbid-crlf
- id: remove-tabs
- id: forbid-tabs
- repo: https://github.com/Lucas-C/pre-commit-hooks-lxml
rev: v1.1.0
hooks:
- id: forbid-html-img-without-alt-text
- id: forbid-non-std-html-attributes
- id: detect-missing-css-classes
args:
- --css-files-dir
- .
- --html-files-dir
- .
- id: html-tags-blacklist
- id: html-attributes-blacklist
- repo: https://github.com/Lucas-C/pre-commit-hooks-safety
rev: v1.1.3
hooks:
- id: python-safety-dependencies-check
- repo: https://github.com/jstewmon/check-swagger
rev: v0.1.4
hooks:
- id: check-swagger
- repo: https://github.com/adrienverge/yamllint.git
rev: v1.25.0 # or higher tag
hooks:
- id: yamllint
args: [--format, parsable, --strict]
- repo: https://github.com/noahsark769/xcodeproj-sort-pre-commit-hook
rev: v1.1.0
hooks:
- id: xcodeproj-sort
args: [--groups-position=above]
- repo: https://github.com/jorisroovers/gitlint
rev: v0.14.0
hooks:
- id: gitlint
stages: [commit-msg]
- repo: https://github.com/psf/black
rev: 21.11b1
hooks:
- id: black
- repo: https://github.com/IamTheFij/docker-pre-commit
rev: v2.0.0
hooks:
- id: docker-compose-check
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v2.5.0
hooks:
- id: prettier
exclude: ^.*(\.ts|\.xib|\.wxs)$
name: prettier + plugin-xml
additional_dependencies:
- '@prettier/plugin-ruby@'
- '@prettier/[email protected]'
args:
- --write
- --list-different
- --ignore-unknown
- --plugin=@prettier/plugin-ruby
- --prose-wrap=always
- --print-width=88
- repo: https://github.com/milin/giticket
rev: v1.3
hooks:
- id: giticket
args: ['--regex=PROJ-[0-9]', '--format={ticket} {commit_msg}'] # Optional
- repo: https://github.com/homebysix/pre-commit-macadmin
rev: v1.8.0
hooks:
- id: check-autopkg-recipe-list
- id: check-autopkg-recipes
- id: check-git-config-email
- id: check-jamf-extension-attributes
- id: check-jamf-scripts
- id: check-jamf-profiles
- id: check-munki-pkgsinfo
- id: check-munkiadmin-scripts
- id: check-munkipkg-buildinfo
- id: check-outset-scripts
- id: check-plists
- id: forbid-autopkg-overrides
- id: forbid-autopkg-trust-info
- repo: https://github.com/pocc/pre-commit-hooks
rev: v1.1.1
hooks:
- id: clang-format
- id: clang-tidy
- id: oclint
args: [-enable-clang-static-analyzer, -enable-global-analysis]
- id: uncrustify
- repo: https://gitlab.com/daverona/pre-commit/cpp
rev: 0.8.0
hooks:
- id: cppcheck # static analyzer for C/C++ code
- repo: https://gitlab.com/smop/pre-commit-hooks
rev: v1.0.0
hooks:
- id: check-poetry
- id: check-gitlab-ci
- repo: https://github.com/APIDevTools/swagger-cli
rev: v4.0.4
hooks:
- id: swagger-validation
- repo: https://gitlab.com/devopshq/gitlab-ci-linter
rev: v1.0.1
hooks:
- id: gitlab-ci-linter
- repo: https://github.com/cheshirekow/cmake-format-precommit
rev: v0.6.13
hooks:
- id: cmake-format
- id: cmake-lint
- repo: https://github.com/nicklockwood/SwiftFormat
rev: v0.0.0
hooks:
- id: swiftformat