Bug 1570772 - [ci] Add a task to run the license linter r=sylvestre
authorAndrew Halberstadt <ahalberstadt@mozilla.com>
Fri, 30 Aug 2019 15:44:40 +0000
changeset 551425 d2fc2720837c81d95d97eaa1539c7fe1bcbb2beb
parent 551424 bbfab97110faa93968227b3704aee8a8526d7cd3
child 551426 a2339aac248c23ecbf12f7429479ba3809aa8657
push id11865
push userbtara@mozilla.com
push dateMon, 02 Sep 2019 08:54:37 +0000
treeherdermozilla-beta@37f59c4671b3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssylvestre
bugs1570772
milestone70.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1570772 - [ci] Add a task to run the license linter r=sylvestre Differential Revision: https://phabricator.services.mozilla.com/D41823
taskcluster/ci/source-test/mozlint.yml
--- a/taskcluster/ci/source-test/mozlint.yml
+++ b/taskcluster/ci/source-test/mozlint.yml
@@ -4,16 +4,17 @@
 ---
 job-defaults:
     always-target: true
     attributes:
         code-review: true
     treeherder:
         kind: test
         tier: 1
+    platform: lint/opt
     worker-type: t-linux-xlarge
     worker:
         docker-image: {in-tree: "lint"}
         max-run-time: 1800
         artifacts:
             - type: file
               name: public/code-review/mozlint.json
               path: /builds/worker/mozlint.json
@@ -26,17 +27,16 @@ job-defaults:
     when:
         files-changed:
             # Other misc lint related files.
             - 'python/mozlint/**'
             - 'tools/lint/**'
 
 codespell:
     description: Checks for misspellings in text files
-    platform: lint/opt
     treeherder:
         symbol: text(spell)
     run:
         mach: lint -l codespell -f treeherder -f json:/builds/worker/mozlint.json
     when:
         files-changed:
             - '**/*.js'
             - '**/*.jsm'
@@ -50,30 +50,28 @@ codespell:
             - '**/*.configure'
             - '**/*.py'
             - '**/*.properties'
             - '**/*.rst'
             - '**/*.ftl'
 
 cpp-virtual-final:
     description: lint C++ virtual function declarations
-    platform: lint/opt
     treeherder:
         symbol: cpp(Cvf)
     run:
         mach: lint -l cpp-virtual-final -f treeherder -f json:/builds/worker/mozlint.json
     when:
         files-changed:
             - '**/*.cpp'
             - '**/*.h'
             - '**/*.mm'
 
 eslint:
     description: JS lint check
-    platform: lint/opt
     treeherder:
         symbol: js(ES)
     run:
         using: run-task
         cwd: '{checkout}'
         command: >
             cp -r /build/node_modules_eslint node_modules &&
             ln -s ../tools/lint/eslint/eslint-plugin-mozilla node_modules &&
@@ -90,135 +88,149 @@ eslint:
             - '**/*.xml'
             # Run when eslint policies change.
             - '**/.eslintignore'
             - '**/*eslintrc*'
             # The plugin implementing custom checks.
             - 'tools/lint/eslint/eslint-plugin-mozilla/**'
             - 'tools/lint/eslint/eslint-plugin-spidermonkey-js/**'
 
+license:
+    description: Check for license blocks in source files.
+    treeherder:
+        symbol: pedantic(license)
+    run:
+        mach: lint -l license -f treeherder -f json:/builds/worker/mozlint.json
+    when:
+        files-changed:
+            - '**/*.c'
+            - '**/*.cc'
+            - '**/*.cpp'
+            - '**/*.h'
+            - '**/*.html'
+            - '**/*.js'
+            - '**/*.jsm'
+            - '**/*.jsx'
+            - '**/*.m'
+            - '**/*.mm'
+            - '**/*.py'
+            - '**/*.rs'
+            - '**/*.xhtml'
+            - '**/*.xml'
+            - '**/*.xul'
+
 mingw-cap:
     description: lint for MinGW Capitalization issues
-    platform: lint/opt
     treeherder:
         symbol: misc(mingw)
     run:
         mach: lint -l mingw-capitalization -f treeherder -f json:/builds/worker/mozlint.json
     when:
         files-changed:
             - '**/*.cpp'
             - '**/*.cc'
             - '**/*.c'
             - '**/*.h'
 
 py-compat:
     description: lint for python 2/3 compatibility issues
-    platform: lint/opt
     treeherder:
         symbol: py(py-compat)
     run:
         mach: lint -l py2 -l py3 -f treeherder -f json:/builds/worker/mozlint.json
     when:
         files-changed:
             - '**/*.py'
             - '**/.flake8'
 
 py-flake8:
     description: flake8 run over the gecko codebase
-    platform: lint/opt
     treeherder:
         symbol: py(f8)
     run:
         mach: lint -l flake8 -f treeherder -f json:/builds/worker/mozlint.json
     when:
         files-changed:
             - '**/*.py'
             - '**/.flake8'
             # moz.configure files are also Python files.
             - '**/*.configure'
 
 test-manifest:
     description: lint test manifests
-    platform: lint/opt
     treeherder:
         symbol: misc(tm)
     run:
         mach: lint -l test-disable -f treeherder -f json:/builds/worker/mozlint.json
     when:
         files-changed:
             - '**/*.ini'
             - 'python/mozlint/**'
             - 'tools/lint/**'
 
 wptlint-gecko:
     description: web-platform-tests linter
-    platform: lint/opt
     treeherder:
         symbol: misc(W)
     run:
         mach: lint -l wpt -f treeherder -f json:/builds/worker/mozlint.json
     when:
         files-changed:
             - 'testing/web-platform/tests/**'
             - 'testing/web-platform/mozilla/tests/**'
 
 yaml:
     description: yamllint run over the gecko codebase
-    platform: lint/opt
     treeherder:
         symbol: pedantic(yaml)
     run:
         mach: lint -l yaml -f treeherder -f json:/builds/worker/mozlint.json
     when:
         files-changed:
             - '**/*.yml'
             - '**/*.yaml'
             - '**/.ymllint'
 
 rst:
     description: rst lint run over the gecko codebase
-    platform: lint/opt
     treeherder:
         symbol: text(rst)
     run:
         mach: lint -l rst -f treeherder -f json:/builds/worker/mozlint.json
     when:
         files-changed:
             - '**/*.rst'
 
 shellcheck:
     description: shellcheck run over the gecko codebase
-    platform: lint/opt
     treeherder:
         symbol: misc(shell)
     run:
         mach: lint -l shellcheck -f treeherder -f json:/builds/worker/mozlint.json
     when:
         files-changed:
             - '**/*.sh'
 
 
 localization:
     description: l10n tests for strings with errors and conflicts with cross-channel
-    platform: lint/opt
     treeherder:
         symbol: text(l1nt)
     run:
         mach: lint -l l10n -f treeherder
     when:
         files-changed:
             - '**/locales/en-US/**'
             - '**/l10n.toml'
             - 'third_party/python/compare-locales/**'
             - 'third_party/python/fluent/**'
 
 
 rustfmt:
     description: rustfmt on the Rust code
-    platform: lint/opt
     treeherder:
         symbol: misc(rustfmt)
     run:
         mach: lint -l rustfmt -f treeherder -f json:/builds/worker/mozlint.json
     when:
         files-changed:
             - '**/*.rs'