blob: 2ef12d70c6f76eefa2a1cc56681445eed4d16db5 (
plain)
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
|
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
---
job-defaults:
always-target: true
attributes:
code-review: true
treeherder:
kind: test
tier: 1
platform: lint/opt
worker-type: t-linux-xlarge-source
worker:
docker-image: {in-tree: "lint"}
max-run-time: 1800
artifacts:
- type: file
name: public/code-review/mozlint.json
path: /builds/worker/mozlint.json
env:
MOZLINT_NO_SUITE: '1'
run:
using: mach
comm-checkout: true
codespell:
description: Checks for misspellings in text files
treeherder:
symbol: text(spell)
# We don't want patches to be backed out because of a typo, a follow-up
# bug will be good enough
tier: 2
run:
mach: >
lint -v -l codespell -f treeherder
-f json:/builds/worker/mozlint.json
--config-path=comm/tools/lint
comm/*
optimization:
skip-unless-mozlint:
root-path: comm
mozlint-config: codespell.yml
eslint:
description: JS lint check
treeherder:
symbol: js(ES)
run:
using: run-task
cwd: '{checkout}'
command: >
cp -r /build/node_modules_eslint node_modules &&
cp -r /build/node_modules_eslint-plugin-mozilla/ tools/lint/eslint/eslint-plugin-mozilla/node_modules &&
ln -s ../tools/lint/eslint/eslint-plugin-mozilla node_modules &&
ln -s ../tools/lint/eslint/eslint-plugin-spidermonkey-js node_modules &&
./mach commlint -v -l eslint -f treeherder -f json:/builds/worker/mozlint.json comm/
optimization:
skip-unless-mozlint:
root-path: comm
mozlint-config: eslint.yml
file-perm:
description: Check for incorrect permissions on source files
platform: lint/opt
treeherder:
symbol: pedantic(file-perm)
# We don't want patches to be backed out because of this, a follow-up
# bug will be good enough
tier: 2
run:
mach: >
lint -v -l file-perm -f treeherder
-f json:/builds/worker/mozlint.json
--config-path=comm/tools/lint
comm/*
optimization:
skip-unless-mozlint:
root-path: comm
mozlint-config: file-perm.yml
file-whitespace:
description: Check for trailing whitespaces and Windows CR
platform: lint/opt
treeherder:
symbol: pedantic(file-whitespace)
# We don't want patches to be backed out because of this, a follow-up
# bug will be good enough
tier: 2
run:
mach: >
lint -v -l file-whitespace -f treeherder
-f json:/builds/worker/mozlint.json
--config-path=comm/tools/lint
comm/*
optimization:
skip-unless-mozlint:
root-path: comm
mozlint-config: file-whitespace.yml
fluent-lint:
description: Check for problems with Fluent files.
treeherder:
symbol: l10n(fluent)
run:
mach: >
lint -l fluent-lint -f treeherder
-f json:/builds/worker/mozlint.json
--config-path=comm/tools/lint
comm/*
optimization:
skip-unless-mozlint:
root-path: comm
mozlint-config: fluent-lint.yml
license:
description: Check for license blocks in source files.
treeherder:
symbol: pedantic(license)
run:
mach: >
lint -v -l license -f treeherder
-f json:/builds/worker/mozlint.json
--config-path=comm/tools/lint
comm/*
optimization:
skip-unless-mozlint:
root-path: comm
mozlint-config: license.yml
l10n-conflicts:
description: l10n tests for strings with errors and conflicts with cross-channel
treeherder:
symbol: l10n(l1nt-conflicts)
always-target: false
run-on-projects: []
run:
mach: >
lint -W -l l10n -f treeherder
-f json:/builds/worker/mozlint.json
--config-path=comm/tools/lint
comm/*
optimization:
skip-unless-mozlint:
root-path: comm
mozlint-config: l10n.yml
localization:
description: l10n tests for strings with errors
treeherder:
symbol: l10n(l1nt)
run:
mach: >
lint -v -l l10n -f treeherder
--config-path=comm/tools/lint
comm/*
attributes:
code-review: false
optimization:
skip-unless-mozlint:
root-path: comm
mozlint-config: l10n.yml
lintpref:
description: Check for duplicates between all.js and StaticPrefList.yaml.
treeherder:
symbol: misc(pref)
run:
mach: >
lint -v -l lintpref -f treeherder
-f json:/builds/worker/mozlint.json
--config-path=comm/tools/lint
comm/*
optimization:
skip-unless-mozlint:
root-path: comm
mozlint-config: lintpref.yml
mingw-cap:
description: lint for MinGW Capitalization issues
treeherder:
symbol: misc(mingw)
run:
mach: >
lint -v -l mingw-capitalization -f treeherder
-f json:/builds/worker/mozlint.json
--config-path=comm/tools/lint
comm/*
optimization:
skip-unless-mozlint:
root-path: comm
mozlint-config: mingw-capitalization.yml
py-black:
description: black run over the gecko codebase
treeherder:
symbol: py(black)
run:
mach: >
lint -v -l black -f treeherder
-f json:/builds/worker/mozlint.json
--config-path=comm/tools/lint
comm/*
optimization:
skip-unless-mozlint:
root-path: comm
mozlint-config: black.yml
py-ruff:
description: Run ruff over the codebase
treeherder:
symbol: py(ruff)
run:
mach: >
commlint -v -l ruff -f treeherder
-f json:/builds/worker/mozlint.json
comm/*
optimization:
skip-unless-mozlint:
root-path: comm
mozlint-config: ruff.yml
shellcheck:
description: shellcheck run over the Thunderbird codebase
treeherder:
symbol: misc(shell)
run-on-projects: []
run:
mach: >
lint -v -l shellcheck -f treeherder
-f json:/builds/worker/mozlint.json
--config-path=comm/tools/lint
comm/*
optimization:
skip-unless-mozlint:
root-path: comm
mozlint-config: shellcheck.yml
stylelint:
description: CSS lint check
treeherder:
symbol: stylelint
run:
using: run-task
cwd: '{checkout}'
command: >
cp -r /build/node_modules_eslint node_modules &&
./mach commlint -v -l stylelint -f treeherder
-f json:/builds/worker/mozlint.json
comm/*
optimization:
skip-unless-mozlint:
root-path: comm
mozlint-config: stylelint.yml
trojan-source:
description: Trojan Source attack - CVE-2021-42572
platform: lint/opt
treeherder:
symbol: misc(trojan-source)
run:
mach: >
lint -v -l trojan-source -f treeherder
-f json:/builds/worker/mozlint.json
--config-path=comm/tools/lint
comm/*
optimization:
skip-unless-mozlint:
root-path: comm
mozlint-config: trojan-source.yml
yaml:
description: yamllint run over the taskcluster configuration
treeherder:
symbol: pedantic(yaml)
run:
mach: >
lint -v -l yaml -f treeherder
-f json:/builds/worker/mozlint.json
--config-path=comm/tools/lint
comm/mail/config
comm/taskcluster
comm/.*.yml
optimization:
skip-unless-mozlint:
root-path: comm
mozlint-config: yaml.yml
|