1
|
|
-.base:
|
|
1
|
+lint-all:
|
2
|
2
|
extends: .with-local-repo-bash
|
3
|
3
|
stage: lint
|
4
|
4
|
image: $IMAGE_PATH
|
... |
... |
@@ -16,281 +16,10 @@ |
16
|
16
|
tags:
|
17
|
17
|
# Run these jobs in the browser dedicated runners.
|
18
|
18
|
- firefox
|
19
|
|
-
|
20
|
|
-eslint:
|
21
|
|
- extends: .base
|
22
|
|
- script:
|
23
|
|
- - .gitlab/ci/jobs/lint/helpers.py --get-changed-files | xargs -d '\n' ./mach lint -v -l eslint
|
24
|
|
- rules:
|
25
|
|
- - if: $CI_PIPELINE_SOURCE == 'merge_request_event'
|
26
|
|
- changes:
|
27
|
|
- # List copied from: taskcluster/ci/source-test/mozlint.yml
|
28
|
|
- #
|
29
|
|
- # Files that are likely audited.
|
30
|
|
- - '**/*.js'
|
31
|
|
- - '**/*.jsm'
|
32
|
|
- - '**/*.json'
|
33
|
|
- - '**/*.jsx'
|
34
|
|
- - '**/*.mjs'
|
35
|
|
- - '**/*.sjs'
|
36
|
|
- - '**/*.html'
|
37
|
|
- - '**/*.xhtml'
|
38
|
|
- - '**/*.xml'
|
39
|
|
- - 'tools/lint/eslint.yml'
|
40
|
|
- # Run when eslint policies change.
|
41
|
|
- - '**/.eslintignore'
|
42
|
|
- - '**/*eslintrc*'
|
43
|
|
- # The plugin implementing custom checks.
|
44
|
|
- - 'tools/lint/eslint/eslint-plugin-mozilla/**'
|
45
|
|
- - 'tools/lint/eslint/eslint-plugin-spidermonkey-js/**'
|
46
|
|
- # Run job whenever a commit is merged to a protected branch
|
47
|
|
- - if: ($CI_COMMIT_BRANCH && $CI_COMMIT_REF_PROTECTED == 'true' && $CI_PIPELINE_SOURCE == 'push')
|
48
|
|
-
|
49
|
|
-stylelint:
|
50
|
|
- extends: .base
|
51
|
|
- script:
|
52
|
|
- - .gitlab/ci/jobs/lint/helpers.py --get-changed-files | xargs -d '\n' ./mach lint -v -l stylelint
|
53
|
|
- rules:
|
54
|
|
- - if: $CI_PIPELINE_SOURCE == 'merge_request_event'
|
55
|
|
- changes:
|
56
|
|
- # List copied from: taskcluster/ci/source-test/mozlint.yml
|
57
|
|
- #
|
58
|
|
- # Files that are likely audited.
|
59
|
|
- - '**/*.css'
|
60
|
|
- - 'tools/lint/styleint.yml'
|
61
|
|
- # Run when stylelint policies change.
|
62
|
|
- - '**/.stylelintignore'
|
63
|
|
- - '**/*stylelintrc*'
|
64
|
|
- # Run job whenever a commit is merged to a protected branch
|
65
|
|
- - if: ($CI_COMMIT_BRANCH && $CI_COMMIT_REF_PROTECTED == 'true' && $CI_PIPELINE_SOURCE == 'push')
|
66
|
|
-
|
67
|
|
-py-black:
|
68
|
|
- extends: .base
|
69
|
|
- script:
|
70
|
|
- - .gitlab/ci/jobs/lint/helpers.py --get-changed-files | xargs -d '\n' ./mach lint -v -l black
|
71
|
|
- rules:
|
72
|
|
- - if: $CI_PIPELINE_SOURCE == 'merge_request_event'
|
73
|
|
- changes:
|
74
|
|
- # List copied from: taskcluster/ci/source-test/mozlint.yml
|
75
|
|
- #
|
76
|
|
- # The list of extensions should match tools/lint/black.yml
|
77
|
|
- - '**/*.py'
|
78
|
|
- - '**/moz.build'
|
79
|
|
- - '**/*.configure'
|
80
|
|
- - '**/*.mozbuild'
|
81
|
|
- - 'pyproject.toml'
|
82
|
|
- - 'tools/lint/black.yml'
|
83
|
|
- # Run job whenever a commit is merged to a protected branch
|
84
|
|
- - if: ($CI_COMMIT_BRANCH && $CI_COMMIT_REF_PROTECTED == 'true' && $CI_PIPELINE_SOURCE == 'push')
|
85
|
|
-
|
86
|
|
-py-ruff:
|
87
|
|
- extends: .base
|
88
|
|
- script:
|
89
|
|
- - .gitlab/ci/jobs/lint/helpers.py --get-changed-files | xargs -d '\n' ./mach lint -v -l ruff
|
90
|
|
- rules:
|
91
|
|
- - if: $CI_PIPELINE_SOURCE == 'merge_request_event'
|
92
|
|
- changes:
|
93
|
|
- # List copied from: taskcluster/ci/source-test/mozlint.yml
|
94
|
|
- #
|
95
|
|
- - '**/*.py'
|
96
|
|
- - '**/*.configure'
|
97
|
|
- - '**/.ruff.toml'
|
98
|
|
- - 'pyproject.toml'
|
99
|
|
- - 'tools/lint/ruff.yml'
|
100
|
|
- - 'tools/lint/python/ruff.py'
|
101
|
|
- - 'tools/lint/python/ruff_requirements.txt'
|
102
|
|
- # Run job whenever a commit is merged to a protected branch
|
103
|
|
- - if: ($CI_COMMIT_BRANCH && $CI_COMMIT_REF_PROTECTED == 'true' && $CI_PIPELINE_SOURCE == 'push')
|
104
|
|
-
|
105
|
|
-yaml:
|
106
|
|
- extends: .base
|
107
|
|
- script:
|
108
|
|
- - .gitlab/ci/jobs/lint/helpers.py --get-changed-files | xargs -d '\n' ./mach lint -v -l yaml
|
109
|
|
- rules:
|
110
|
|
- - if: $CI_PIPELINE_SOURCE == 'merge_request_event'
|
111
|
|
- changes:
|
112
|
|
- # List copied from: taskcluster/ci/source-test/mozlint.yml
|
113
|
|
- #
|
114
|
|
- - '**/*.yml'
|
115
|
|
- - '**/*.yaml'
|
116
|
|
- - '**/.ymllint'
|
117
|
|
- # Run job whenever a commit is merged to a protected branch
|
118
|
|
- - if: ($CI_COMMIT_BRANCH && $CI_COMMIT_REF_PROTECTED == 'true' && $CI_PIPELINE_SOURCE == 'push')
|
119
|
|
-
|
120
|
|
-shellcheck:
|
121
|
|
- extends: .base
|
122
|
|
- script:
|
123
|
|
- - .gitlab/ci/jobs/lint/helpers.py --get-changed-files | xargs -d '\n' ./mach lint -v -l shellcheck
|
124
|
|
- rules:
|
125
|
|
- - if: $CI_PIPELINE_SOURCE == 'merge_request_event'
|
126
|
|
- changes:
|
127
|
|
- # List copied from: taskcluster/ci/source-test/mozlint.yml
|
128
|
|
- #
|
129
|
|
- - '**/*.sh'
|
130
|
|
- - 'tools/lint/shellcheck.yml'
|
131
|
|
- # Run job whenever a commit is merged to a protected branch
|
132
|
|
- - if: ($CI_COMMIT_BRANCH && $CI_COMMIT_REF_PROTECTED == 'true' && $CI_PIPELINE_SOURCE == 'push')
|
133
|
|
-
|
134
|
|
-clang-format:
|
135
|
|
- extends: .base
|
136
|
19
|
script:
|
137
|
20
|
- ./mach configure --without-wasm-sandboxed-libraries --with-base-browser-version=0.0.0
|
138
|
|
- - .gitlab/ci/jobs/lint/helpers.py --get-changed-files | xargs -d '\n' ./mach lint -v -l clang-format
|
139
|
|
- rules:
|
140
|
|
- - if: $CI_PIPELINE_SOURCE == 'merge_request_event'
|
141
|
|
- changes:
|
142
|
|
- # List copied from: taskcluster/ci/source-test/mozlint.yml
|
143
|
|
- #
|
144
|
|
- - '**/*.cpp'
|
145
|
|
- - '**/*.c'
|
146
|
|
- - '**/*.cc'
|
147
|
|
- - '**/*.h'
|
148
|
|
- - '**/*.m'
|
149
|
|
- - '**/*.mm'
|
150
|
|
- - 'tools/lint/clang-format.yml'
|
151
|
|
- # Run job whenever a commit is merged to a protected branch
|
152
|
|
- - if: ($CI_COMMIT_BRANCH && $CI_COMMIT_REF_PROTECTED == 'true' && $CI_PIPELINE_SOURCE == 'push')
|
153
|
|
-
|
154
|
|
-rustfmt:
|
155
|
|
- extends: .base
|
156
|
|
- script:
|
157
|
|
- - .gitlab/ci/jobs/lint/helpers.py --get-changed-files | xargs -d '\n' ./mach lint -v -l rustfmt
|
158
|
|
- rules:
|
159
|
|
- - if: $CI_PIPELINE_SOURCE == 'merge_request_event'
|
160
|
|
- changes:
|
161
|
|
- # List copied from: taskcluster/ci/source-test/mozlint.yml
|
162
|
|
- #
|
163
|
|
- - '**/*.rs'
|
164
|
|
- - 'tools/lint/rustfmt.yml'
|
165
|
|
- # Run job whenever a commit is merged to a protected branch
|
166
|
|
- - if: ($CI_COMMIT_BRANCH && $CI_COMMIT_REF_PROTECTED == 'true' && $CI_PIPELINE_SOURCE == 'push')
|
167
|
|
-
|
168
|
|
-fluent-lint:
|
169
|
|
- extends: .base
|
170
|
|
- script:
|
171
|
|
- - .gitlab/ci/jobs/lint/helpers.py --get-changed-files | xargs -d '\n' ./mach lint -v -l fluent-lint
|
172
|
|
- rules:
|
173
|
|
- - if: $CI_PIPELINE_SOURCE == 'merge_request_event'
|
174
|
|
- changes:
|
175
|
|
- # List copied from: taskcluster/ci/source-test/mozlint.yml
|
176
|
|
- #
|
177
|
|
- - '**/*.ftl'
|
178
|
|
- - 'tools/lint/fluent-lint.yml'
|
179
|
|
- - 'tools/lint/fluent-lint/exclusions.yml'
|
180
|
|
- # Run job whenever a commit is merged to a protected branch
|
181
|
|
- - if: ($CI_COMMIT_BRANCH && $CI_COMMIT_REF_PROTECTED == 'true' && $CI_PIPELINE_SOURCE == 'push')
|
182
|
|
-
|
183
|
|
-localization:
|
184
|
|
- extends: .base
|
185
|
|
- script:
|
186
|
|
- - .gitlab/ci/jobs/lint/helpers.py --get-changed-files | xargs -d '\n' ./mach lint -v -l l10n
|
187
|
|
- rules:
|
188
|
|
- - if: $CI_PIPELINE_SOURCE == 'merge_request_event'
|
189
|
|
- changes:
|
190
|
|
- # List copied from: taskcluster/ci/source-test/mozlint.yml
|
191
|
|
- #
|
192
|
|
- - '**/locales/en-US/**'
|
193
|
|
- - '**/l10n.toml'
|
194
|
|
- - 'third_party/python/compare-locales/**'
|
195
|
|
- - 'third_party/python/fluent/**'
|
196
|
|
- - 'tools/lint/l10n.yml'
|
197
|
|
- # Run job whenever a commit is merged to a protected branch
|
198
|
|
- - if: ($CI_COMMIT_BRANCH && $CI_COMMIT_REF_PROTECTED == 'true' && $CI_PIPELINE_SOURCE == 'push')
|
199
|
|
-
|
200
|
|
-mingw-capitalization:
|
201
|
|
- extends: .base
|
202
|
|
- script:
|
203
|
|
- - .gitlab/ci/jobs/lint/helpers.py --get-changed-files | xargs -d '\n' ./mach lint -v -l mingw-capitalization
|
204
|
|
- rules:
|
205
|
|
- - if: $CI_PIPELINE_SOURCE == 'merge_request_event'
|
206
|
|
- changes:
|
207
|
|
- # List copied from: taskcluster/ci/source-test/mozlint.yml
|
208
|
|
- #
|
209
|
|
- - '**/*.cpp'
|
210
|
|
- - '**/*.cc'
|
211
|
|
- - '**/*.c'
|
212
|
|
- - '**/*.h'
|
213
|
|
- - 'tools/lint/mingw-capitalization.yml'
|
214
|
|
- # Run job whenever a commit is merged to a protected branch
|
215
|
|
- - if: ($CI_COMMIT_BRANCH && $CI_COMMIT_REF_PROTECTED == 'true' && $CI_PIPELINE_SOURCE == 'push')
|
216
|
|
-
|
217
|
|
-mscom-init:
|
218
|
|
- extends: .base
|
219
|
|
- script:
|
220
|
|
- - .gitlab/ci/jobs/lint/helpers.py --get-changed-files | xargs -d '\n' ./mach lint -v -l mscom-init
|
221
|
|
- rules:
|
222
|
|
- - if: $CI_PIPELINE_SOURCE == 'merge_request_event'
|
223
|
|
- changes:
|
224
|
|
- # List copied from: taskcluster/ci/source-test/mozlint.yml
|
225
|
|
- #
|
226
|
|
- - '**/*.cpp'
|
227
|
|
- - '**/*.cc'
|
228
|
|
- - '**/*.c'
|
229
|
|
- - '**/*.h'
|
230
|
|
- - 'tools/lint/mscom-init.yml'
|
231
|
|
- # Run job whenever a commit is merged to a protected branch
|
232
|
|
- - if: ($CI_COMMIT_BRANCH && $CI_COMMIT_REF_PROTECTED == 'true' && $CI_PIPELINE_SOURCE == 'push')
|
233
|
|
-
|
234
|
|
-file-whitespace:
|
235
|
|
- extends: .base
|
236
|
|
- script:
|
237
|
|
- - .gitlab/ci/jobs/lint/helpers.py --get-changed-files | xargs -d '\n' ./mach lint -v -l file-whitespace
|
238
|
|
- rules:
|
239
|
|
- - if: $CI_PIPELINE_SOURCE == 'merge_request_event'
|
240
|
|
- changes:
|
241
|
|
- # List copied from: taskcluster/ci/source-test/mozlint.yml
|
242
|
|
- #
|
243
|
|
- - '**/*.c'
|
244
|
|
- - '**/*.cc'
|
245
|
|
- - '**/*.cpp'
|
246
|
|
- - '**/*.css'
|
247
|
|
- - '**/*.dtd'
|
248
|
|
- - '**/*.idl'
|
249
|
|
- - '**/*.ftl'
|
250
|
|
- - '**/*.h'
|
251
|
|
- - '**/*.html'
|
252
|
|
- - '**/*.md'
|
253
|
|
- - '**/*.properties'
|
254
|
|
- - '**/*.py'
|
255
|
|
- - '**/*.rs'
|
256
|
|
- - '**/*.rst'
|
257
|
|
- - '**/*.webidl'
|
258
|
|
- - '**/*.xhtml'
|
259
|
|
- - '**/*.java'
|
260
|
|
- - 'tools/lint/file-whitespace.yml'
|
261
|
|
- # Run job whenever a commit is merged to a protected branch
|
262
|
|
- - if: ($CI_COMMIT_BRANCH && $CI_COMMIT_REF_PROTECTED == 'true' && $CI_PIPELINE_SOURCE == 'push')
|
263
|
|
-
|
264
|
|
-test-manifest:
|
265
|
|
- extends: .base
|
266
|
|
- script:
|
267
|
|
- - .gitlab/ci/jobs/lint/helpers.py --get-changed-files | xargs -d '\n' ./mach lint -v -l test-manifest-alpha -l test-manifest-disable -l test-manifest-skip-if
|
268
|
|
- rules:
|
269
|
|
- - if: $CI_PIPELINE_SOURCE == 'merge_request_event'
|
270
|
|
- changes:
|
271
|
|
- # List copied from: taskcluster/ci/source-test/mozlint.yml
|
272
|
|
- #
|
273
|
|
- - '**/*.ini'
|
274
|
|
- - 'python/mozlint/**'
|
275
|
|
- - 'tools/lint/**'
|
276
|
|
- # Run job whenever a commit is merged to a protected branch
|
277
|
|
- - if: ($CI_COMMIT_BRANCH && $CI_COMMIT_REF_PROTECTED == 'true' && $CI_PIPELINE_SOURCE == 'push')
|
278
|
|
-
|
279
|
|
-trojan-source:
|
280
|
|
- extends: .base
|
281
|
|
- script:
|
282
|
|
- - .gitlab/ci/jobs/lint/helpers.py --get-changed-files | xargs -d '\n' ./mach lint -v -l trojan-source
|
|
21
|
+ - .gitlab/ci/jobs/lint/helpers.py --get-changed-files | xargs -d '\n' ./mach lint -v
|
283
|
22
|
rules:
|
284
|
23
|
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
|
285
|
|
- changes:
|
286
|
|
- # List copied from: taskcluster/ci/source-test/mozlint.yml
|
287
|
|
- #
|
288
|
|
- - '**/*.c'
|
289
|
|
- - '**/*.cc'
|
290
|
|
- - '**/*.cpp'
|
291
|
|
- - '**/*.h'
|
292
|
|
- - '**/*.py'
|
293
|
|
- - '**/*.rs'
|
294
|
|
- - 'tools/lint/trojan-source.yml'
|
295
|
24
|
# Run job whenever a commit is merged to a protected branch
|
296
|
25
|
- if: ($CI_COMMIT_BRANCH && $CI_COMMIT_REF_PROTECTED == 'true' && $CI_PIPELINE_SOURCE == 'push') |