Bug 1392787 - Add a linter to prevent comment-disabling tests in manifestparser manifests, r?jmaher draft
authorAndrew Halberstadt <ahalberstadt@mozilla.com>
Wed, 23 Aug 2017 09:33:18 -0400
changeset 665468 65793a1571204d5b049f96c9307a8480efaf2697
parent 665467 5d69b8be96dd724a5a8d90cfc623cfdf1c1e590b
child 665469 8a98d2b5b0b4a8ddf464e0bc94b71b60d002a8f5
push id80069
push userahalberstadt@mozilla.com
push dateFri, 15 Sep 2017 13:29:20 +0000
reviewersjmaher
bugs1392787
milestone57.0a1
Bug 1392787 - Add a linter to prevent comment-disabling tests in manifestparser manifests, r?jmaher MozReview-Commit-ID: LG47ASBMA17
taskcluster/ci/source-test/mozlint.yml
tools/lint/test-disable.yml
--- a/taskcluster/ci/source-test/mozlint.yml
+++ b/taskcluster/ci/source-test/mozlint.yml
@@ -48,16 +48,17 @@ py-compat:
         docker-image: {in-tree: "lint"}
         max-run-time: 1800
     run:
         using: mach
         mach: lint -l py2 -l py3 -f treeherder
     when:
         files-changed:
             - '**/*.py'
+            - '**/.flake8'
             - 'python/mozlint/**'
             - 'tools/lint/**'
 
 py-flake8:
     description: flake8 run over the gecko codebase
     platform: lint/opt
     treeherder:
         symbol: f8
@@ -72,16 +73,36 @@ py-flake8:
         mach: lint -l flake8 -f treeherder
     when:
         files-changed:
             - '**/*.py'
             - '**/.flake8'
             - 'python/mozlint/**'
             - 'tools/lint/**'
 
+test-manifest:
+    description: lint test manifests
+    platform: lint/opt
+    treeherder:
+        symbol: tm
+        kind: test
+        tier: 1
+    worker-type: aws-provisioner-v1/gecko-t-linux-xlarge
+    worker:
+        docker-image: {in-tree: "lint"}
+        max-run-time: 1800
+    run:
+        using: mach
+        mach: lint -l test-disable -f treeherder
+    when:
+        files-changed:
+            - '**/*.ini'
+            - 'python/mozlint/**'
+            - 'tools/lint/**'
+
 wptlint-gecko:
     description: web-platform-tests linter
     platform: lint/opt
     treeherder:
         symbol: W
         kind: test
         tier: 1
     worker-type: aws-provisioner-v1/gecko-t-linux-xlarge
new file mode 100644
--- /dev/null
+++ b/tools/lint/test-disable.yml
@@ -0,0 +1,14 @@
+---
+no-comment-disable:
+    description: "Use 'disable=<reason>' to disable a test instead of a comment"
+    include:
+        - "**/*.ini"
+    exclude:
+        - "**/application.ini"
+        - "**/l10n.ini"
+        - testing/mozbase/manifestparser/tests
+        - testing/web-platform
+        - xpcom/tests/unit/data
+    extensions: ['ini']
+    type: regex
+    payload: ^[ \t]*(#|;)[ \t]*\[