summaryrefslogtreecommitdiffstats
path: root/comm/taskcluster/ci/source-test/mozlint.yml
diff options
context:
space:
mode:
Diffstat (limited to 'comm/taskcluster/ci/source-test/mozlint.yml')
-rw-r--r--comm/taskcluster/ci/source-test/mozlint.yml287
1 files changed, 287 insertions, 0 deletions
diff --git a/comm/taskcluster/ci/source-test/mozlint.yml b/comm/taskcluster/ci/source-test/mozlint.yml
new file mode 100644
index 0000000000..2ef12d70c6
--- /dev/null
+++ b/comm/taskcluster/ci/source-test/mozlint.yml
@@ -0,0 +1,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