taskcluster/ci/source-test/mozlint.yml
author Chris Peterson <cpeterson@mozilla.com>
Thu, 15 Feb 2018 00:50:02 -0800
changeset 755993 4c2d2210ce45faa0e84663e3b5a12faf04a81ce4
parent 748833 74a58d59187ba2df6d65c2b4676cc5698bcb6c51
child 765037 3af433dfe78cf3ddc1d1eb445bf2dc6b8bcb6ffb
child 765506 3e6c75a2f859a32be5662e8e655872b6d78f536b
permissions -rw-r--r--
Bug 1436263 - Part 5: Add a mach lint for virtual function declarations with multiple specifiers. r=froydnj r?ahal Virtual function declarations should specify only one of `virtual`, `final`, or `override`, as per the Mozilla C++ style guide: https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Coding_Style This lint warns about: virtual void Bad1() final void Bad2() final override void Bad3() override final Caveats: This lint doesn't warn about `virtual void NotBad() override` at this time because there are 8000+ instances. It also doesn't warn about function declarations that span multiple lines because the regex can't match across line breaks. MozReview-Commit-ID: LcBsOAKKgz7

job-defaults:
    always-target: true
    treeherder:
        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
    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: spell
    run:
        mach: lint -l codespell -f treeherder
    when:
        files-changed:
            - '**/*.js'
            - '**/*.jsm'
            - '**/*.jxs'
            - '**/*.xml'
            - '**/*.html'
            - '**/*.xhtml'
            - '**/*.cpp'
            - '**/*.c'
            - '**/*.h'
            - '**/*.configure'
            - '**/*.py'
            - '**/*.properties'
            - '**/*.rst'

cpp-virtual-final:
    description: lint C++ virtual function declarations
    platform: lint/opt
    treeherder:
        symbol: Cvf
    run:
        mach: lint -l cpp-virtual-final -f treeherder
    when:
        files-changed:
            - '**/*.cpp'
            - '**/*.h'
            - '**/*.mm'

eslint:
    description: JS lint check
    platform: lint/opt
    treeherder:
        symbol: ES
    run:
        using: run-task
        command: >
            cd /builds/worker/checkouts/gecko/ &&
            cp -r /build/node_modules_eslint node_modules &&
            ln -s ../tools/lint/eslint/eslint-plugin-mozilla node_modules &&
            ln -s ../tools/lint/eslint/eslint-plugin-spidermonkey-js node_modules &&
            ./mach lint -l eslint -f treeherder --quiet
    when:
        files-changed:
            # Files that are likely audited.
            - '**/*.js'
            - '**/*.jsm'
            - '**/*.jsx'
            - '**/*.html'
            - '**/*.xhtml'
            - '**/*.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/**'

py-compat:
    description: lint for python 2/3 compatibility issues
    platform: lint/opt
    treeherder:
        symbol: py-compat
    run:
        mach: lint -l py2 -l py3 -f treeherder
    when:
        files-changed:
            - '**/*.py'
            - '**/.flake8'

py-flake8:
    description: flake8 run over the gecko codebase
    platform: lint/opt
    treeherder:
        symbol: f8
    run:
        mach: lint -l flake8 -f treeherder
    when:
        files-changed:
            - '**/*.py'
            - '**/.flake8'
            # moz.configure files are also Python files.
            - '**/*.configure'

test-manifest:
    description: lint test manifests
    platform: lint/opt
    treeherder:
        symbol: tm
    run:
        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
    run:
        mach: lint -l wpt -l wpt_manifest -f treeherder
    when:
        files-changed:
            - 'testing/web-platform/tests/**'
            - 'testing/web-platform/mozilla/tests/**'
            - 'testing/web-platform/meta/MANIFEST.json'
            - 'testing/web-platform/mozilla/meta/MANIFEST.json'

yaml:
    description: yamllint run over the gecko codebase
    platform: lint/opt
    treeherder:
        symbol: yaml
    run:
        mach: lint -l yaml -f treeherder
    when:
        files-changed:
            - '**/*.yml'
            - '**/*.yaml'
            - '**/.ymllint'

shellcheck:
    description: shellcheck run over the gecko codebase
    platform: lint/opt
    treeherder:
        symbol: shell
    run:
        mach: lint -l shellcheck -f treeherder
    when:
        files-changed:
            - '**/*.sh'