Revision control

Copy as Markdown

Other Tools

# 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/.
---
task-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: >
commlint -v -l codespell -f treeherder
-f json:/builds/worker/mozlint.json
comm/*
optimization:
skip-unless-mozlint: codespell.yml
eslint:
description: JS lint check
treeherder:
symbol: js(ES)
run:
using: run-task
cwd: '{checkout}'
command: >
cp -r $MOZ_FETCHES_DIR/node_modules 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: eslint.yml
fetches:
toolchain:
- linux64-node
- node-modules
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: >
commlint -v -l file-perm -f treeherder
-f json:/builds/worker/mozlint.json
comm/*
optimization:
skip-unless-mozlint: 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: >
commlint -v -l file-whitespace -f treeherder
-f json:/builds/worker/mozlint.json
comm/*
optimization:
skip-unless-mozlint: file-whitespace.yml
fluent-lint:
description: Check for problems with Fluent files.
treeherder:
symbol: l10n(fluent)
run:
mach: >
commlint -l fluent-lint -f treeherder
-f json:/builds/worker/mozlint.json
comm/*
optimization:
skip-unless-mozlint: fluent-lint.yml
license:
description: Check for license blocks in source files.
treeherder:
symbol: pedantic(license)
run:
mach: >
commlint -v -l license -f treeherder
-f json:/builds/worker/mozlint.json
comm/*
optimization:
skip-unless-mozlint: 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: >
commlint -W -l l10n -f treeherder
-f json:/builds/worker/mozlint.json
comm/*
optimization:
skip-unless-mozlint: l10n.yml
localization:
description: l10n tests for strings with errors
treeherder:
symbol: l10n(l1nt)
run:
mach: >
commlint -v -l l10n -f treeherder
comm/*
attributes:
code-review: false
optimization:
skip-unless-mozlint: l10n.yml
lintpref:
description: Check for duplicates between all.js and StaticPrefList.yaml.
treeherder:
symbol: misc(pref)
run:
mach: >
commlint -v -l lintpref -f treeherder
-f json:/builds/worker/mozlint.json
comm/*
optimization:
skip-unless-mozlint: lintpref.yml
mingw-cap:
description: lint for MinGW Capitalization issues
treeherder:
symbol: misc(mingw)
run:
mach: >
commlint -v -l mingw-capitalization -f treeherder
-f json:/builds/worker/mozlint.json
comm/*
optimization:
skip-unless-mozlint: mingw-capitalization.yml
py-black:
description: black run over the gecko codebase
treeherder:
symbol: py(black)
run:
mach: >
commlint -v -l black -f treeherder
-f json:/builds/worker/mozlint.json
comm/*
optimization:
skip-unless-mozlint: 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: ruff.yml
rustfmt:
description: rustfmt on the Rust code
treeherder:
symbol: rust(rustfmt)
run:
mach: >
commlint -v -l rustfmt -f treeherder
-f json:/builds/worker/mozlint.json comm/
fetches:
toolchain:
- linux64-rust
optimization:
skip-unless-mozlint: rustfmt.yml
shellcheck:
description: shellcheck run over the Thunderbird codebase
treeherder:
symbol: misc(shell)
run-on-projects: []
run:
mach: >
commlint -v -l shellcheck -f treeherder
-f json:/builds/worker/mozlint.json
comm/*
optimization:
skip-unless-mozlint: shellcheck.yml
stylelint:
description: CSS lint check
treeherder:
symbol: stylelint
run:
using: run-task
cwd: '{checkout}'
command: >
cp -r $MOZ_FETCHES_DIR/node_modules 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 stylelint -f treeherder
-f json:/builds/worker/mozlint.json
comm/*
optimization:
skip-unless-mozlint: stylelint.yml
fetches:
toolchain:
- linux64-node
- node-modules
trojan-source:
description: Trojan Source attack - CVE-2021-42572
platform: lint/opt
treeherder:
symbol: misc(trojan-source)
run:
mach: >
commlint -v -l trojan-source -f treeherder
-f json:/builds/worker/mozlint.json
comm/*
optimization:
skip-unless-mozlint: trojan-source.yml
yaml:
description: yamllint run over the taskcluster configuration
treeherder:
symbol: pedantic(yaml)
run:
mach: >
commlint -v -l yaml -f treeherder
-f json:/builds/worker/mozlint.json
comm/mail/config
comm/taskcluster
comm/.*.yml
optimization:
skip-unless-mozlint: yaml.yml