taskcluster/ci/source-test/mozlint.yml
author Andrew Halberstadt <ahalberstadt@mozilla.com>
Mon, 30 Oct 2017 09:43:52 -0400
changeset 692217 6c19de382ad3dc300a7321effe138756a4329fe5
parent 686746 cb9d057a402ddbc917a19ceef95eb70a93fef813
child 717929 d90b8e337f97435b2dc9b3145388f52c93d201a5
child 748276 3491729b1b2360d93477049d9755c39d64a6b264
child 748294 f586475f6f44a054b38baa85501918640b143660
permissions -rw-r--r--
Bug 1408352 - Add 'always_target' to lint and python unittest tasks, r?dustin The mochitest and reftest selftest tasks are excluded because they also schedule several builds as dependencies which is likely going to be unexpected behaviour. MozReview-Commit-ID: 9eoVJ5qpAMO

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/**'

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'