mirror of
https://github.com/mozilla-firefox/firefox
synced 2026-08-11 12:19:28 +00:00
None of the mozcheck-backed linters declare a `setup` key, so mozcheck:setup, which calls _find_mozcheck_binary() and possibly bootstraps mozcheck doesn't run before mozlint runs the linters. mozlint runs linters in a ProcessPoolExecutor, and all those processes may end up calling _find_mozcheck_binary() themselves at the same time. In that case, they may all run `mach taskgraph tasks`, in turn running `hg` and later possibly `cargo`. In some cases, that could lead to random failures. By declaring mozcheck:setup as a setup for all the linters, the binary is now resolved (and possibly bootstrapped) only once, before linter processes are spawn. `setup` and `lint` also have to agree on the root they pass down, or _get_mozcheck_target_dir() can hand them two different target directories and the workers end up rebuilding anyway; both now go through _resolve_root(). Differential Revision: https://phabricator.services.mozilla.com/D316224
52 lines
1.8 KiB
YAML
52 lines
1.8 KiB
YAML
---
|
|
avoid-dot-mozilla-without-xdg:
|
|
description: >-
|
|
New code is hard-coding ".mozilla" which is referencing the path on
|
|
Linux, should ensure it is handled with XDG configuration paths. See
|
|
the documentation for more info.
|
|
level: error
|
|
include: ['.']
|
|
type: external
|
|
payload: mozcheck:lint
|
|
setup: mozcheck:setup
|
|
check: rejected-words
|
|
check-config:
|
|
regex-pattern: "\"\\.mozilla\"|'\\.mozilla'"
|
|
ignore-case: true
|
|
support-files:
|
|
- 'tools/lint/mozcheck/**'
|
|
extensions:
|
|
- js
|
|
- mjs
|
|
- jsx
|
|
- cpp
|
|
- c
|
|
- h
|
|
- configure
|
|
- py
|
|
- properties
|
|
- yml
|
|
- yaml
|
|
- java
|
|
- kt
|
|
- rs
|
|
exclude:
|
|
# Files which reference .mozilla but are not referencing the Linux path
|
|
- tools/lint/dot-mozilla-reference.yml
|
|
- taskcluster/kinds/source-test/mozlint.yml
|
|
- browser/components/originattributes/test/browser/browser_firstPartyIsolation_aboutPages.js
|
|
- browser/components/originattributes/test/browser/browser_firstPartyIsolation_js_uri.js
|
|
- caps/OriginAttributes.cpp
|
|
- toolkit/components/resistfingerprinting/nsRFPService.cpp
|
|
- docshell/base/URIFixup.sys.mjs
|
|
- netwerk/cookie/CookieCommons.cpp
|
|
- toolkit/components/antitracking/test/browser/browser_thirdPartyChecks_sandboxed_context.js
|
|
# Files which reference .mozilla and have XDG handling in place
|
|
- testing/talos/talos/heavy.py
|
|
- toolkit/crashreporter/crash_helper_server/src/logging/env.rs
|
|
- toolkit/moz.configure
|
|
- toolkit/xre/nsXREDirProvider.cpp
|
|
- toolkit/xre/test/marionette/xdg_config/test_xdg_config_legacy_existing.py
|
|
- toolkit/tests/gtest/TestXREAppDir.cpp
|
|
- xpcom/io/nsAppFileLocationProvider.cpp
|