-
-
Notifications
You must be signed in to change notification settings - Fork 22
Expand file tree
/
Copy pathprek.toml
More file actions
307 lines (293 loc) · 7.86 KB
/
Copy pathprek.toml
File metadata and controls
307 lines (293 loc) · 7.86 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
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
294
295
296
297
298
299
300
301
302
303
304
305
306
307
# Configuration file for `prek`, a git hook framework written in Rust.
#:schema https://www.schemastore.org/prek.json
default_stages = [
"pre-commit",
"pre-push"
]
default_language_version = { python = "python3" }
minimum_prek_version = "0.3.4"
[[repos]]
repo = "meta"
hooks = [
{
id = "identity",
name = "run identity check",
description = "check you have set your git identity",
priority = 10
},
{
id = "check-hooks-apply",
name = "run check hooks apply",
description = "check that all the hooks apply to the repository",
priority = 10
}
]
[[repos]]
repo = "local"
hooks = [
{
id = "prettier",
name = "run prettier",
description = "format files with prettier",
priority = 40,
entry = "prettier --write '**/*.md' '**/*.yaml' '**/*.yml'",
files = '\.(md|ya?ml)$',
language = "node",
additional_dependencies = ["prettier@3.8.4"],
pass_filenames = false
},
{
id = "check-zip-file-is-not-committed",
name = "check no Zip files are committed",
description = "Zip files are not allowed in the repository",
priority = 50,
language = "fail",
entry = """
Zip files are not allowed in the repository as they are hard to
track and have security implications. Please remove the zip file from the repository
""",
files = '(?i)\.zip$'
}
]
[[repos]]
repo = "https://github.com/codespell-project/codespell"
rev = "57b21406f092110c18776e39b0bda50d37c945c8" # frozen: v2.4.3
hooks = [
{
id = "codespell",
name = "run codespell",
description = "Check spelling with codespell",
priority = 50,
additional_dependencies = ["tomli"]
}
]
[[repos]]
repo = "https://github.com/Lucas-C/pre-commit-hooks"
rev = "ad1b27d73581aa16cca06fc4a0761fc563ffe8e8" # frozen: v1.5.6
hooks = [
{
id = "chmod",
name = "set file permissions",
description = "manual hook to be run by macOS or Linux users for a full repository clean up",
priority = 35,
args = ['644'],
files = '\.md$',
stages = ["manual"]
}
]
[[repos]]
repo = "https://github.com/pre-commit/pre-commit-hooks"
rev = "3e8a8703264a2f4a69428a0aa4dcb512790b2c8c" # frozen: v6.0.0
hooks = [
{
id = "check-case-conflict",
name = "run check-case-conflict",
description = "check for case conflicts in file names",
priority = 50
},
{
id = "check-illegal-windows-names",
name = "run check-illegal-windows-names",
description = "check for Windows-illegal file names",
priority = 50
},
{
id = "check-json",
name = "run check-json",
description = "check JSON files for syntax errors",
priority = 50,
exclude = '^\.github/linters/\.stylelintrc\.json$'
},
{
id = "check-toml",
name = "run check-toml",
description = "check TOML files for syntax errors",
priority = 50
},
{
id = "check-merge-conflict",
name = "run check-merge-conflict",
description = "check for merge conflict markers",
priority = 50
},
{
id = "check-symlinks",
name = "run check-symlinks",
description = "checks for symlinks which do not point to anything",
always_run = true,
priority = 50
},
{
id = "check-vcs-permalinks",
name = "run check-vcs-permalinks",
description = "ensures that links to vcs websites are permalinks",
priority = 50
},
{
id = "detect-aws-credentials",
name = "run detect-aws-credentials",
description = "checks for the existence of AWS secrets that you have set up with the AWS CLI",
args = ["--allow-missing-credentials"],
priority = 50
},
{
id = "detect-private-key",
name = "run detect-private-key",
description = "checks for the existence of private keys",
priority = 50,
exclude = '^compiler/tests/fixtures/ssl/server\.key$'
},
{
id = "end-of-file-fixer",
name = "run end-of-file-fixer",
description = "makes sure files end in a newline and only a newline",
priority = 37,
exclude = '^compiler/src/.*$|\.out$|^\.github/linters/\.clang-format$|^\.github/linters/\.shellcheckrc$|^\.github/linters/\.chktexrc$|^\.github/linters/\.stylelintrc\.json$'
},
{
id = "file-contents-sorter",
name = "run file-contents-sorter",
description = "sort the lines in specified files (defaults to alphabetical)",
args = ["--unique"],
files = '^\.github/linters/codespell\.txt$',
priority = 40
},
{
id = "fix-byte-order-marker",
name = "run fix-byte-order-marker",
description = "fixes files with UTF-8 byte order markers",
priority = 20
},
{
id = "forbid-submodules",
name = "run forbid-submodules",
description = "forbids any submodules in the repository",
priority = 50
},
{
id = "trailing-whitespace",
name = "run trailing-whitespace",
description = "trims trailing whitespace",
args = ["--markdown-linebreak-ext=md"],
priority = 30,
exclude = '^compiler/src/.*$|\.out$'
}
]
[[repos]]
repo = "https://github.com/biomejs/pre-commit"
rev = "646c16033359bc8df479bac9eb87df9e0d6b60a1" # frozen: v2.5.4
hooks = [
{
id = "biome-check",
name = "run biome check",
description = "format, lint, and organize CSS, HTML, JavaScript, JSON and SVG with Biome",
priority = 45,
files = '\.(css|html|js|json|ts)$',
exclude = '^\.github/linters/\.stylelintrc\.json$|^benchmark/results/.*\.json$'
}
]
[[repos]]
repo = "https://github.com/igorshubovych/markdownlint-cli"
rev = "5b5dddc4fb0f83c3ea1fc5616fa63e115dce83e0" # frozen: v0.49.1
hooks = [
{
id = "markdownlint",
name = "run markdownlint",
description = "check Markdown files with markdownlint",
priority = 50,
args = ["--config=.github/linters/.markdown-lint.yml"],
exclude = '^\.github/.*$',
types = ["markdown"],
files = '\.md$'
}
]
[[repos]]
repo = "https://github.com/shellcheck-py/shellcheck-py"
rev = "745eface02aef23e168a8afb6b5737818efbea95" # frozen: v0.11.0.1
hooks = [
{
id = "shellcheck",
name = "run shellcheck",
description = "check Shell scripts with shellcheck",
priority = 50
}
]
[[repos]]
repo = "https://github.com/scop/pre-commit-shfmt"
rev = "05c1426671b9237fb5e1444dd63aa5731bec0dfb" # frozen: v3.13.1-1
hooks = [
{
id = "shfmt",
name = "run shfmt",
description = "format shell scripts with shfmt",
priority = 40,
stages = ["manual"],
args = [
"-w",
"-i",
"4"
],
files = '\.sh$'
}
]
[[repos]]
repo = "https://github.com/pre-commit/mirrors-clang-format"
rev = "f4d7745e17a28aad7eed2f4874ca8d1568c11c4c" # frozen: v22.1.8
hooks = [
{
id = "clang-format",
name = "run clang-format",
description = "format C code with clang-format (LLVM 22, uses repo-root .clang-format)",
priority = 40,
args = ["-i"],
files = '^compiler/.*\.(c|h)$'
}
]
[[repos]]
repo = "https://github.com/astral-sh/ruff-pre-commit"
rev = "2700fd5671c633760d912769c041bfcde2b9a01b" # frozen: v0.15.22
hooks = [
{
id = "ruff-check",
name = "run ruff check",
description = "lint Python code with ruff",
priority = 40,
args = ["--fix"]
},
{
id = "ruff-format",
name = "run ruff format",
description = "format Python code with ruff",
priority = 40
}
]
[[repos]]
repo = "https://github.com/adrienverge/yamllint"
rev = "cba56bcde1fdd01c1deb3f945e69764c291a6530" # frozen: v1.38.0
hooks = [
{
id = "yamllint",
name = "run yamllint",
description = "check YAML files with yamllint",
priority = 50,
args = [
"--strict",
"-c",
".github/linters/.yaml-lint.yml"
],
types = ["yaml"],
files = '\.ya?ml$'
}
]
[[repos]]
repo = "https://github.com/editorconfig-checker/editorconfig-checker.python"
rev = "bebfac867564fbd992e5b45379b4b0568d5cb85b" # frozen: 3.6.1
hooks = [
{
id = "editorconfig-checker",
name = "run editorconfig-checker",
description = "a tool to verify that your files are in harmony with your .editorconfig",
priority = 50,
alias = "ec"
}
]