-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.pre-commit-config.yaml
233 lines (214 loc) · 6.36 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
---
# 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.4.0
hooks:
- id: check-added-large-files
args: [--maxkb=150]
- id: check-ast
- id: check-byte-order-marker
exclude: ^.*(\.cs|\.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: >
(?x)(
^\.vscode/.*\.json|
^\.github/.*\.yml
)$
- 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]
- id: debug-statements
- id: destroyed-symlinks
- id: detect-private-key
- 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: pretty-format-json
exclude: >
(?x)(
^\.vscode/.*\.json|
^\.github/.*\.yml
)$
args: [--autofix]
- 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.10.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.4.0
hooks:
- id: add-trailing-comma
- repo: https://github.com/asottile/blacken-docs
rev: 1.13.0
hooks:
- id: blacken-docs
additional_dependencies: [black>=22.1.0]
- repo: https://github.com/jumanjihouse/pre-commit-hooks
rev: 3.0.0
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: 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,SC2155']
- id: shfmt
- 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-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.3.1
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/noahsark769/xcodeproj-sort-pre-commit-hook
rev: v1.1.1
hooks:
- id: xcodeproj-sort
args: [--groups-position=above]
- repo: https://github.com/jorisroovers/gitlint
rev: v0.19.0dev
hooks:
- id: gitlint
stages: [commit-msg]
- repo: https://github.com/psf/black
rev: 22.12.0
hooks:
- id: black
- repo: https://github.com/IamTheFij/docker-pre-commit
rev: v2.1.1
hooks:
- id: docker-compose-check
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.0.0-alpha.4
hooks:
- id: prettier
exclude: ^.*(\.ts|\.xib)$
name: prettier + plugin-xml
additional_dependencies:
- prettier@2.3.2
- '@prettier/plugin-ruby@'
- '@prettier/plugin-xml@0.12.0'
args:
- --write
- --list-different
- --ignore-unknown
- --plugin=@prettier/plugin-ruby
- --prose-wrap=always
- --print-width=88
- repo: https://github.com/milin/giticket
rev: v1.4
hooks:
- id: giticket
args: ['--regex=PROJ-[0-9]', '--format={ticket} {commit_msg}'] # Optional
- repo: https://github.com/homebysix/pre-commit-macadmin
rev: v1.12.3
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://gitlab.com/smop/pre-commit-hooks
rev: v1.0.0
hooks:
- id: check-poetry
- repo: https://github.com/APIDevTools/swagger-cli
rev: v4.0.4
hooks:
- id: swagger-validation
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.33.0
hooks:
- id: markdownlint