Closed Bug 2085852 Opened 29 days ago Closed 26 days ago

Fix `support-files` matching so config changes lint the whole tree

Categories

(Developer Infrastructure :: Lint and Formatting, enhancement)

enhancement

Tracking

(firefox161 fixed)

RESOLVED FIXED
161 Branch
Tracking Status
firefox161 --- fixed

People

(Reporter: ahochheiden, Assigned: ahochheiden)

References

(Blocks 1 open bug)

Details

Attachments

(2 external files)

Relative support-files patterns and missing eslint and stylelint config files mean config changes only lint the changed files.

should_lint_entire_tree matched each changed file's absolute path
against the support-files patterns. Most patterns are relative to the
root, so only those starting with **/ matched, along with the absolute
path of the linter's own definition. Changing a file like
tools/lint/eslint/__init__.py or tools/lint/python/ruff.py under
--outgoing or --workdir linted only the changed files instead of the
whole tree.

The rules live in eslint.config.mjs and the eslint-*.config.mjs files
it imports, and stylelint reads stylelint-rollouts.config.js, but the
support-files only listed the older .eslintrc.js and .stylelintrc.js.
Changing a rule under --outgoing or --workdir linted only the changed
files instead of the whole tree.

Pushed by ahochheiden@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/c21df9d11f54 https://hg.mozilla.org/integration/autoland/rev/8c8129488358 Part 1 - Match `support-files` against paths relative to the root r=linter-reviewers,marco https://github.com/mozilla-firefox/firefox/commit/42ae4f630663 https://hg.mozilla.org/integration/autoland/rev/baf0ee9519c6 Part 2 - List the eslint and stylelint configs in their `support-files` r=linter-reviewers,sergesanspaille
Status: NEW → RESOLVED
Closed: 26 days ago
Resolution: --- → FIXED
Target Milestone: --- → 161 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: