tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

mozlint.yml (25694B)


      1 # This Source Code Form is subject to the terms of the Mozilla Public
      2 # License, v. 2.0. If a copy of the MPL was not distributed with this
      3 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
      4 ---
      5 task-defaults:
      6    always-target: true
      7    attributes:
      8        code-review: true
      9    treeherder:
     10        kind: test
     11        tier: 1
     12    platform: lint/opt
     13    worker-type: t-linux-docker-amd
     14    worker:
     15        docker-image: {in-tree: "lint"}
     16        max-run-time: 1800
     17        artifacts:
     18            - type: file
     19              name: public/code-review/mozlint.json
     20              path: /builds/worker/mozlint.json
     21            - type: file
     22              name: public/profile_resource-usage.json
     23              path: /builds/worker/profile_resource-usage.json
     24    run:
     25        using: mach
     26        use-caches: [checkout, pip, uv]
     27    when:
     28        files-changed:
     29            # Other misc lint related files.
     30            - 'python/mozlint/**'
     31            - 'tools/lint/**'
     32 
     33 codespell:
     34    description: Checks for misspellings in text files
     35    treeherder:
     36        symbol: text(spell)
     37        # We don't want patches to be backed out because of a typo, a follow up bug will be
     38        # good enough
     39        tier: 2
     40    run:
     41        mach: lint -v -l codespell -f treeherder -f json:/builds/worker/mozlint.json .
     42    when:
     43        files-changed:
     44            - '**/*.js'
     45            - '**/*.jsx'
     46            - '**/*.mjs'
     47            - '**/*.xml'
     48            - '**/*.html'
     49            - '**/*.xhtml'
     50            - '**/*.cpp'
     51            - '**/*.c'
     52            - '**/*.h'
     53            - '**/*.configure'
     54            - '**/*.py'
     55            - '**/*.properties'
     56            - '**/*.rst'
     57            - '**/*.ftl'
     58            - 'tools/lint/codespell.yml'
     59 
     60 
     61 rejected-words:
     62    description: Reject some words we don't want to use in the code base
     63    treeherder:
     64        symbol: text(rejected-words)
     65        # We don't want patches to be backed out because of this, a follow up bug will be
     66        # good enough
     67        tier: 2
     68    run:
     69        mach: lint -v -l rejected-words -f treeherder -f json:/builds/worker/mozlint.json .
     70    when:
     71        files-changed:
     72            - '**/*.js'
     73            - '**/*.jsx'
     74            - '**/*.mjs'
     75            - '**/*.xml'
     76            - '**/*.html'
     77            - '**/*.xhtml'
     78            - '**/*.cpp'
     79            - '**/*.c'
     80            - '**/*.h'
     81            - '**/*.idl'
     82            - '**/*.webidl'
     83            - '**/*.configure'
     84            - '**/*.py'
     85            - '**/*.properties'
     86            - '**/*.rst'
     87            - '**/*.ftl'
     88            - '**/*.java'
     89            - '**/*.kt'
     90            - '**/*.rs'
     91            - 'tools/lint/rejected-words.yml'
     92 
     93 
     94 dot-mozilla-reference:
     95    description: Give visibility to misuse of ".mozilla" being hardcoded and thus breaking XDG support
     96    treeherder:
     97        symbol: text(dot-mozilla-reference)
     98        # We don't want patches to be backed out because of this, a follow up bug will be
     99        # good enough
    100        tier: 2
    101    run:
    102        mach: lint -v -l dot-mozilla-reference -f treeherder -f json:/builds/worker/mozlint.json .
    103    when:
    104        files-changed:
    105            - '**/*.js'
    106            - '**/*.jsx'
    107            - '**/*.mjs'
    108            - '**/*.cpp'
    109            - '**/*.c'
    110            - '**/*.h'
    111            - '**/*.configure'
    112            - '**/*.py'
    113            - '**/*.properties'
    114            - '**/*.yml'
    115            - '**/*.yaml'
    116            - '**/*.java'
    117            - '**/*.kt'
    118            - '**/*.rs'
    119            - 'tools/lint/dot-mozilla-reference.yml'
    120 
    121 eslint:
    122    description: JS lint check
    123    treeherder:
    124        symbol: js(ES)
    125    run:
    126        using: run-task
    127        cwd: '{checkout}'
    128        use-caches: [checkout, pip, uv, npm]
    129        command: >
    130            cp -r $MOZ_FETCHES_DIR/node_modules node_modules &&
    131            ln -s ../tools/lint/eslint/eslint-plugin-mozilla node_modules &&
    132            ln -s ../tools/lint/eslint/eslint-plugin-spidermonkey-js node_modules &&
    133            ./mach lint -v -l eslint -f treeherder -f json:/builds/worker/mozlint.json .
    134    when:
    135        files-changed:
    136            # Files that are likely audited.
    137            - '**/*.js'
    138            - '**/*.json'
    139            - '**/*.jsx'
    140            - '**/*.mjs'
    141            - '**/*.sjs'
    142            - '**/*.html'
    143            - '**/*.xhtml'
    144            - '**/*.ts'
    145            - 'tools/lint/eslint.yml'
    146            # Run when eslint or prettier policies change.
    147            - '**/*eslintrc*'
    148            - '.prettier*'
    149            # The plugin implementing custom checks.
    150            - 'tools/lint/eslint/eslint-plugin-mozilla/**'
    151            - 'tools/lint/eslint/eslint-plugin-spidermonkey-js/**'
    152    fetches:
    153        toolchain:
    154            - linux64-node
    155            - node-modules
    156 
    157 
    158 eslint-build:
    159    description: ESLint checks with build data
    160    always-target: false
    161    # Triggered by cron task, don't run on any projects and disable optimization.
    162    run-on-projects: []
    163    when: null
    164    attributes:
    165        code-review: false
    166    treeherder:
    167        symbol: js(ES-B)
    168        tier: 2
    169    run:
    170        using: run-task
    171        cwd: '{checkout}'
    172        use-caches: [checkout, pip, uv, npm]
    173        command: >
    174            export MOZ_XPT_ARTIFACTS_DIR="$MOZ_FETCHES_DIR/$MOZ_XPT_ARTIFACTS_DIRNAME" &&
    175            find "$MOZ_XPT_ARTIFACTS_DIR" &&
    176            cp -r $MOZ_FETCHES_DIR/node_modules node_modules &&
    177            ln -s ../tools/lint/eslint/eslint-plugin-mozilla node_modules &&
    178            ln -s ../tools/lint/eslint/eslint-plugin-spidermonkey-js node_modules &&
    179            ./mach lint -v -l eslint -f treeherder --quiet -f json:/builds/worker/mozlint.json . --rule "mozilla/valid-services-property: error" --rule "mozilla/valid-ci-uses: error"
    180    worker:
    181        env:
    182            MOZ_XPT_ARTIFACTS_DIRNAME: xpt_artifacts
    183    require-build:
    184        .*: build-linux64/opt
    185    fetches:
    186        build:
    187            - artifact: target.xpt_artifacts.zip
    188              dest: xpt_artifacts
    189        toolchain:
    190            - linux64-node
    191            - node-modules
    192 
    193 stylelint:
    194    description: CSS lint check
    195    treeherder:
    196        symbol: stylelint
    197    run:
    198        using: run-task
    199        cwd: '{checkout}'
    200        command: >
    201            cp -r $MOZ_FETCHES_DIR/node_modules node_modules &&
    202            ln -s ../tools/lint/eslint/eslint-plugin-mozilla node_modules &&
    203            ln -s ../tools/lint/eslint/eslint-plugin-spidermonkey-js node_modules &&
    204            ./mach lint -v -l stylelint -f treeherder -f json:/builds/worker/mozlint.json .
    205    when:
    206        files-changed:
    207            # Files that are likely audited.
    208            - '**/*.css'
    209            - 'tools/lint/styleint.yml'
    210            # Run when stylelint policies change.
    211            - '**/.stylelintignore'
    212            - '**/*stylelintrc*'
    213            # Run when installed packages change.
    214            - 'package*.json'
    215            # The plugin implementing custom checks.
    216            - 'tools/lint/stylelint/stylelint-plugin-mozilla/**'
    217    fetches:
    218        toolchain:
    219            - linux64-node
    220            - node-modules
    221 
    222 typescript:
    223    description: TypeScript checker
    224    treeherder:
    225        symbol: js(TSC)
    226        tier: 3
    227    run:
    228        using: run-task
    229        cwd: '{checkout}'
    230        use-caches: [checkout, pip, uv, npm]
    231        command: >
    232            cp -r $MOZ_FETCHES_DIR/node_modules node_modules &&
    233            ln -s ../tools/lint/eslint/eslint-plugin-mozilla node_modules &&
    234            ln -s ../tools/lint/eslint/eslint-plugin-spidermonkey-js node_modules &&
    235            ./mach lint -v -l typescript -f treeherder -f json:/builds/worker/mozlint.json .
    236    when:
    237        files-changed:
    238            # Files that are likely audited.
    239            # These should be kept in sync with the list of includes in
    240            # tools/lint/typescript.yml
    241            # Not adding `jsx` for these since we know there's no jsx files in
    242            # these directories.
    243            - 'browser/components/places/**/*.*js'
    244            - 'browser/components/places/**/*.ts'
    245            - 'browser/components/search/**/*.*js'
    246            - 'browser/components/search/**/*.ts'
    247            - 'browser/components/urlbar/**/*.*js'
    248            - 'browser/components/urlbar/**/*.ts'
    249            - 'toolkit/components/places/**/*.*js'
    250            - 'toolkit/components/places/**/*.ts'
    251            - 'toolkit/components/search/**/*.*js'
    252            - 'toolkit/components/search/**/*.ts'
    253            # Support Files
    254            - 'tools/@types/**'
    255            - 'tools/lint/typescript.yml'
    256            - 'tools/lint/typescript/**'
    257    fetches:
    258        toolchain:
    259            - linux64-node
    260            - node-modules
    261 
    262 license:
    263    description: Check for license blocks in source files.
    264    treeherder:
    265        symbol: pedantic(license)
    266    run:
    267        mach: lint -v -l license -f treeherder -f json:/builds/worker/mozlint.json .
    268    when:
    269        files-changed:
    270            - '**/*.c'
    271            - '**/*.cc'
    272            - '**/*.cpp'
    273            - '**/*.css'
    274            - '**/*.dtd'
    275            - '**/*.ftl'
    276            - '**/*.h'
    277            - '**/*.html'
    278            - '**/*.idl'
    279            - '**/*.js'
    280            - '**/*.jsx'
    281            - '**/*.kt'
    282            - '**/*.m'
    283            - '**/*.mjs'
    284            - '**/*.mm'
    285            - '**/*.properties'
    286            - '**/*.py'
    287            - '**/*.rs'
    288            - '**/*.svg'
    289            - '**/*.webidl'
    290            - '**/*.xhtml'
    291            - '**/*.xml'
    292            - 'tools/lint/license.yml'
    293 
    294 lintpref:
    295    description: Check for duplicates between all.js and StaticPrefList.yaml.
    296    treeherder:
    297        symbol: misc(pref)
    298    run:
    299        mach: lint -v -l lintpref -f treeherder -f json:/builds/worker/mozlint.json .
    300    when:
    301        files-changed:
    302            - 'modules/libpref/init/all.js'
    303            - 'modules/libpref/init/StaticPrefList.yaml'
    304            - 'browser/app/profile/firefox.js'
    305            - 'devtools/client/preferences/debugger.js'
    306            - 'mobile/android/app/geckoview-prefs.js'
    307            - 'browser/branding/official/pref/firefox-branding.js'
    308            - 'browser/branding/nightly/pref/firefox-branding.js'
    309            - 'browser/branding/unofficial/pref/firefox-branding.js'
    310            - 'browser/branding/aurora/pref/firefox-branding.js'
    311            - 'browser/app/profile/channel-prefs.js'
    312            - 'mobile/android/installer/mobile-l10n.js'
    313            - 'mobile/android/locales/en-US/mobile-l10n.js'
    314            - 'tools/lint/lintpref.yml'
    315 
    316 node-licenses:
    317    description: Lint for node licenses issues
    318    treeherder:
    319        symbol: misc(node-licenses)
    320    run:
    321        using: run-task
    322        cwd: '{checkout}'
    323        use-caches: [checkout, pip, uv, npm]
    324        command: >
    325            cp -r $MOZ_FETCHES_DIR/node_modules node_modules &&
    326            ln -s ../tools/lint/eslint/eslint-plugin-mozilla node_modules &&
    327            ln -s ../tools/lint/eslint/eslint-plugin-spidermonkey-js node_modules &&
    328            cp -r $MOZ_FETCHES_DIR/eslint-plugin-mozilla/node_modules tools/lint/eslint/eslint-plugin-mozilla/node_modules &&
    329            cp -r $MOZ_FETCHES_DIR/stylelint-plugin-mozilla/node_modules tools/lint/stylelint/stylelint-plugin-mozilla/node_modules &&
    330            cp -r $MOZ_FETCHES_DIR/terser/node_modules tools/terser/node_modules &&
    331            ./mach lint -v -l node-licenses -f treeherder -f json:/builds/worker/mozlint.json .
    332    when:
    333        files-changed:
    334            - 'tools/lint/node-licenses.yml'
    335            - 'tools/lint/node-licenses/**.py'
    336            # When we cover most package.json files, then we should enable this
    337            # generally, for now cover just what we need.
    338            # - '**/package.json'
    339            - package.json
    340            - tools/lint/eslint/eslint-plugin-mozilla/package.json
    341            - tools/lint/stylelint/stylelint-plugin-mozilla/package.json
    342            - tools/terser/package.json
    343    fetches:
    344        toolchain:
    345            - linux64-node
    346            - node-modules
    347            - eslint-plugin-mozilla
    348            - stylelint-plugin-mozilla
    349            - terser
    350 
    351 node-package-names:
    352    description: Lint for node package name issues
    353    treeherder:
    354        symbol: misc(npn)
    355    run:
    356        mach: lint -v -l node-package-names -f treeherder -f json:/builds/worker/mozlint.json .
    357    when:
    358        files-changed:
    359            - '**/package.json'
    360            - 'tools/lint/node-package-names.yml'
    361 
    362 mingw-cap:
    363    description: lint for MinGW Capitalization issues
    364    treeherder:
    365        symbol: misc(mingw)
    366    run:
    367        mach: lint -v -l mingw-capitalization -f treeherder -f json:/builds/worker/mozlint.json .
    368    when:
    369        files-changed:
    370            - '**/*.cpp'
    371            - '**/*.cc'
    372            - '**/*.c'
    373            - '**/*.h'
    374            - 'tools/lint/mingw-capitalization.yml'
    375 
    376 updatebot:
    377    description: Ensure moz.yaml files are valid per schema
    378    treeherder:
    379        symbol: misc(mozyaml)
    380    run:
    381        mach: lint -v -l updatebot -f treeherder -f json:/builds/worker/mozlint.json .
    382    when:
    383        files-changed:
    384            - '**/moz.yaml'
    385 
    386 mscom-init:
    387    description: Lint for Microsoft COM initialization
    388    treeherder:
    389        symbol: misc(mscom)
    390    run:
    391        mach: lint -v -l mscom-init -f treeherder -f json:/builds/worker/mozlint.json .
    392    when:
    393        files-changed:
    394            - '**/*.cpp'
    395            - '**/*.cc'
    396            - '**/*.c'
    397            - '**/*.h'
    398            - '**/*.rs'
    399            - 'tools/lint/mscom-init.yml'
    400 
    401 py-ruff-format:
    402    description: ruff format run over the gecko codebase
    403    treeherder:
    404        symbol: py(ruff-format)
    405    run:
    406        mach: lint -v -l ruff-format -f treeherder -f json:/builds/worker/mozlint.json .
    407    when:
    408        files-changed:
    409            # The list of extensions should match tools/lint/ruff-format.yml
    410            - '**/*.py'
    411            - '**/moz.build'
    412            - '**/*.configure'
    413            - '**/*.mozbuild'
    414            - 'pyproject.toml'
    415            - 'tools/lint/ruff-format.yml'
    416            - 'tools/lint/python/ruff.py'
    417 
    418 py-ruff:
    419    description: Run ruff over the gecko codebase
    420    treeherder:
    421        symbol: py(ruff)
    422    run:
    423        mach: lint -v -l ruff -f treeherder -f json:/builds/worker/mozlint.json .
    424    when:
    425        files-changed:
    426            - '**/*.py'
    427            - '**/*.configure'
    428            - '**/.ruff.toml'
    429            - 'pyproject.toml'
    430            - 'tools/lint/ruff.yml'
    431            - 'tools/lint/python/ruff.py'
    432 
    433 
    434 python-sites:
    435    description: Lint for python sites
    436    treeherder:
    437        symbol: misc(pysites)
    438    run:
    439        mach: lint -v -l python-sites -f treeherder -f json:/builds/worker/mozlint.json .
    440    when:
    441        files-changed:
    442            - 'python/sites/**'
    443 
    444 
    445 test-manifest:
    446    description: lint test manifests
    447    treeherder:
    448        symbol: misc(tm)
    449    run:
    450        mach: lint -v -l test-manifest-toml -f treeherder -f json:/builds/worker/mozlint.json .
    451    when:
    452        files-changed:
    453            - '**/*.toml'
    454            - 'python/mozlint/**'
    455            - 'tools/lint/**'
    456 
    457 wptlint-gecko:
    458    description: web-platform-tests linter
    459    treeherder:
    460        symbol: misc(W)
    461    run:
    462        mach: lint -v -l wpt -f treeherder -f json:/builds/worker/mozlint.json .
    463    when:
    464        files-changed:
    465            - 'testing/web-platform/tests/**'
    466            - 'testing/web-platform/mozilla/tests/**'
    467            - 'tools/lint/wpt.yml'
    468 
    469 yaml:
    470    description: yamllint run over the gecko codebase
    471    treeherder:
    472        symbol: pedantic(yaml)
    473    run:
    474        mach: lint -v -l yaml -f treeherder -f json:/builds/worker/mozlint.json .
    475    when:
    476        files-changed:
    477            - '**/*.yml'
    478            - '**/*.yaml'
    479            - '**/.ymllint'
    480 
    481 rst:
    482    description: rst lint run over the gecko codebase
    483    treeherder:
    484        symbol: text(rst)
    485    run:
    486        mach: lint -v -l rst -f treeherder -f json:/builds/worker/mozlint.json .
    487    when:
    488        files-changed:
    489            - '**/*.rst'
    490            - 'tools/lint/rst.yml'
    491 
    492 shellcheck:
    493    description: shellcheck run over the gecko codebase
    494    treeherder:
    495        symbol: misc(shell)
    496    run:
    497        mach: lint -v -l shellcheck -f treeherder -f json:/builds/worker/mozlint.json .
    498    when:
    499        files-changed:
    500            - '**/*.sh'
    501            - 'tools/lint/shellcheck.yml'
    502 
    503 
    504 localization:
    505    description: l10n tests for strings with errors
    506    treeherder:
    507        symbol: l10n(l1nt)
    508    run:
    509        mach: lint -v -l l10n -f treeherder *
    510    attributes:
    511        code-review: false
    512    when:
    513        files-changed:
    514            - '**/locales/en-US/**'
    515            - '**/l10n.toml'
    516            - 'third_party/python/compare-locales/**'
    517            - 'third_party/python/fluent/**'
    518            - 'tools/lint/l10n.yml'
    519 
    520 
    521 l10n-conflicts:
    522    description: l10n tests for strings with errors and conflicts with firefox-l10n-source
    523    treeherder:
    524        symbol: l10n(l1nt-conflicts)
    525    always-target: false
    526    run-on-projects: []
    527    run:
    528        mach: lint -W -l l10n -f treeherder -f json:/builds/worker/mozlint.json .
    529    when:
    530        files-changed:
    531            - '**/locales/en-US/**'
    532            - '**/l10n.toml'
    533            - 'third_party/python/compare-locales/**'
    534            - 'third_party/python/fluent/**'
    535            - 'tools/lint/l10n.yml'
    536 
    537 
    538 clang-format:
    539    description: clang-format on the C/C++ code
    540    treeherder:
    541        symbol: cpp(clang-format)
    542    run:
    543        mach: lint -v -l clang-format -f treeherder -f json:/builds/worker/mozlint.json .
    544    when:
    545        files-changed:
    546            - '**/*.cpp'
    547            - '**/*.c'
    548            - '**/*.cc'
    549            - '**/*.h'
    550            - '**/*.m'
    551            - '**/*.mm'
    552            - 'tools/lint/clang-format.yml'
    553    dependencies:
    554        linux64-clang-tidy: toolchain-linux64-clang-tidy
    555    fetches:
    556        linux64-clang-tidy:
    557            - artifact: clang-tidy.tar.zst
    558              dest: clang-tools
    559 
    560 
    561 rustfmt:
    562    description: rustfmt on the Rust code
    563    treeherder:
    564        symbol: rust(rustfmt)
    565    run:
    566        mach: lint -v -l rustfmt -f treeherder -f json:/builds/worker/mozlint.json .
    567    when:
    568        files-changed:
    569            - '**/*.rs'
    570            - 'tools/lint/rustfmt.yml'
    571    fetches:
    572        toolchain:
    573            - linux64-rust
    574 
    575 
    576 clippy:
    577    description: clippy on the Rust code
    578    treeherder:
    579        symbol: rust(clippy)
    580    run:
    581        prepend-env:
    582            PATH: "$MOZ_FETCHES_DIR/rustc/bin/${PATH:+:$PATH}"
    583        mach: lint -v -l clippy -f treeherder -f json:/builds/worker/mozlint.json -j 1 .
    584    when:
    585        files-changed:
    586            - '**/*.rs'
    587            - '**/Cargo.toml'
    588            - 'tools/lint/clippy.yml'
    589    fetches:
    590        toolchain:
    591            - linux64-clang
    592            - linux64-rust
    593            - linux64-rust-size
    594            - linux64-cbindgen
    595            - linux64-dump_syms
    596            - linux64-sccache
    597            - linux64-nasm
    598            - linux64-node
    599            - linux64-pkgconf
    600            - sysroot-x86_64-linux-gnu
    601            - sysroot-wasm32-wasi
    602 
    603 cargo-audit:
    604    description: Audit cargo lock files for vulnerable dependencies
    605    treeherder:
    606        symbol: rust(cargo-audit)
    607    run:
    608        prepend-env:
    609            PATH: "$MOZ_FETCHES_DIR/rustc/bin/:/builds/worker/.cargo/bin/${PATH:+:$PATH}"
    610        mach: lint -v --warnings=soft -l cargo-audit -f treeherder -f json:/builds/worker/mozlint.json .
    611    when:
    612        files-changed:
    613            - 'Cargo.lock'
    614    fetches:
    615        toolchain:
    616            - linux64-rust
    617 
    618 file-whitespace:
    619    description: Check for trailing whitespaces and Windows CR
    620    platform: lint/opt
    621    treeherder:
    622        symbol: pedantic(file-whitespace)
    623        # We don't want patches to be backed out because of this, a follow up bug will be
    624        # good enough
    625        tier: 2
    626    run:
    627        mach: lint -v -l file-whitespace -f treeherder -f json:/builds/worker/mozlint.json .
    628    when:
    629        files-changed:
    630            - '**/*.c'
    631            - '**/*.cc'
    632            - '**/*.cpp'
    633            - '**/*.css'
    634            - '**/*.dtd'
    635            - '**/*.idl'
    636            - '**/*.ftl'
    637            - '**/*.h'
    638            - '**/*.html'
    639            - '**/*.json'
    640            - '**/*.md'
    641            - '**/*.mn'
    642            - '**/*.properties'
    643            - '**/*.py'
    644            - '**/*.rs'
    645            - '**/*.rst'
    646            - '**/*.toml'
    647            - '**/*.webidl'
    648            - '**/*.yaml'
    649            - '**/*.yml'
    650            - '**/*.xhtml'
    651 
    652 
    653 file-perm:
    654    description: Check for incorrect permissions on source files
    655    platform: lint/opt
    656    treeherder:
    657        symbol: pedantic(file-perm)
    658        # We don't want patches to be backed out because of this, a follow up bug will be
    659        # good enough
    660        tier: 2
    661    run:
    662        mach: lint -v -l file-perm -f treeherder -f json:/builds/worker/mozlint.json .
    663    when:
    664        files-changed:
    665            - '**/*.build'
    666            - '**/*.c'
    667            - '**/*.cc'
    668            - '**/*.cpp'
    669            - '**/*.css'
    670            - '**/*.flac'
    671            - '**/*.h'
    672            - '**/*.html'
    673            - '**/*.idl'
    674            - '**/*.js'
    675            - '**/*.json'
    676            - '**/*.jsx'
    677            - '**/*.m'
    678            - '**/*.m4s'
    679            - '**/*.md'
    680            - '**/*.mjs'
    681            - '**/*.mm'
    682            - '**/*.mn'
    683            - '**/*.mozbuild'
    684            - '**/*.mp4'
    685            - '**/*.png'
    686            - '**/*.rs'
    687            - '**/*.rst'
    688            - '**/*.svg'
    689            - '**/*.toml'
    690            - '**/*.ts'
    691            - '**/*.ttf'
    692            - '**/*.wasm'
    693            - '**/*.webidl'
    694            - '**/*.xhtml'
    695            - '**/*.xml'
    696            - '**/*.yaml'
    697            - '**/*.yml'
    698 
    699 
    700 perfdocs-verify:
    701    description: Verifies Performance Testing documentation
    702    treeherder:
    703        symbol: text(perfdocs)
    704    run:
    705        mach: lint -v -l perfdocs -f treeherder -f json:/builds/worker/mozlint.json .
    706    worker:
    707        env:
    708            WORKSPACE: /builds/worker/checkouts/gecko/
    709            DECISION_TASK_ID: {task-reference: <decision>}
    710        artifacts:
    711            - type: file
    712              name: public/perfdocs.diff
    713              path: /builds/worker/diff.txt
    714    when:
    715        files-changed:
    716            - 'devtools/perfdocs/**'
    717            - 'taskcluster/**'
    718            - '**/perftest.toml'
    719            - 'python/mozperftest/**'
    720            - 'testing/awsy/**'
    721            - 'testing/raptor/**'
    722            - 'testing/talos/**'
    723            - 'testing/performance/**'
    724            - 'testing/perfdocs/**'
    725            - 'tools/lint/perfdocs.yml'
    726            - 'toolkit/components/ml/tests/browser/**'
    727            - '**/*_perf.js'
    728 
    729 
    730 condprof-addons-verify:
    731    description: |
    732      Verifies all xpi files needed by condprof customization sideloading addons are
    733      included in the firefox-addons fetch task.
    734    treeherder:
    735        symbol: misc(condprof-addons)
    736    run:
    737        mach: |
    738            lint -v -l condprof-addons -f treeherder -f json:/builds/worker/mozlint.json .
    739    fetches:
    740        fetch:
    741            - firefox-addons
    742    when:
    743        files-changed:
    744            - 'testing/condprofile/condprof/customization/*.json'
    745            - 'taskcluster/ci/fetch/browsertime.yml'
    746 
    747 fluent-lint:
    748    description: Check for problems with Fluent files.
    749    platform: lint/opt
    750    treeherder:
    751        symbol: l10n(fluent)
    752    run:
    753        mach: lint --linter fluent-lint -f treeherder -f json:/builds/worker/mozlint.json .
    754    when:
    755        files-changed:
    756            - '**/*.ftl'
    757            - 'tools/lint/fluent-lint.yml'
    758            - 'tools/lint/fluent-lint/exclusions.yml'
    759 
    760 glean-parser:
    761    description: Lint Glean telemetry configuration files
    762    treeherder:
    763        symbol: misc(glean-parser)
    764    run:
    765        mach: lint -v -l glean-parser -f treeherder -f json:/builds/worker/mozlint.json .
    766    when:
    767        files-changed:
    768            - '**/*metrics.yaml'
    769            - '**/pings.yaml'
    770            - 'tools/lint/glean-parser.yml'
    771            - 'tools/lint/glean-parser/**'
    772 
    773 trojan-source:
    774    description: Trojan Source attack - CVE-2021-42572
    775    platform: lint/opt
    776    treeherder:
    777        symbol: misc(trojan-source)
    778    run:
    779        mach: lint -v -l trojan-source --include-third-party -f treeherder -f json:/builds/worker/mozlint.json .
    780    when:
    781        files-changed:
    782            - '**/*.c'
    783            - '**/*.cc'
    784            - '**/*.cpp'
    785            - '**/*.h'
    786            - '**/*.py'
    787            - '**/*.rs'
    788            - 'tools/lint/trojan-source.yml'
    789 
    790 ignorefile-test:
    791    description: .gitignore vs .hgignore consistency check
    792    platform: lint/opt
    793    treeherder:
    794        symbol: ignorefile
    795    run:
    796        mach: lint -v -l ignorefile .gitignore .hgignore
    797    when:
    798        files-changed:
    799            - '.gitignore'
    800            - '.hgignore'
    801 
    802 
    803 c-includes:
    804    description: Remove unused mfbt includes from the codebase
    805    treeherder:
    806        symbol: cpp(includes)
    807    run:
    808        mach: lint -l includes -f treeherder -f json:/builds/worker/mozlint.json .
    809    when:
    810        files-changed:
    811            - '**/*.c'
    812            - '**/*.cc'
    813            - '**/*.cpp'
    814            - '**/*.cxx'
    815            - '**/*.h'
    816            - '**/*.hpp'
    817            - '**/*.m'
    818            - '**/*.mm'
    819            - 'tools/lint/includes.yml'
    820            - 'tools/lint/includes/**'
    821            - 'mfbt/api.yml'
    822 
    823 gecko-trace:
    824    description: Check that all `gecko-trace.yaml` files are correct
    825    treeherder:
    826        symbol: misc(gecko-trace)
    827    run:
    828        mach: lint -l gecko-trace -f treeherder -f json:/builds/worker/mozlint.json .
    829    when:
    830        files-changed:
    831            - '**/gecko-trace.yaml'
    832            - '**/gecko-trace.yml'