Closed
Bug 1375861
Opened 7 years ago
Closed 6 years ago
[mozlint] Automatically exclude 3rd party paths
Categories
(Developer Infrastructure :: Lint and Formatting, enhancement, P5)
Developer Infrastructure
Lint and Formatting
Tracking
(firefox64 fixed)
RESOLVED
FIXED
mozilla64
Tracking | Status | |
---|---|---|
firefox64 | --- | fixed |
People
(Reporter: ahal, Assigned: ahal)
References
(Depends on 1 open bug)
Details
Attachments
(1 file)
There's a maintained list of third party paths that live in the tree:
https://dxr.mozilla.org/mozilla-central/source/tools/rewriting/ThirdPartyPaths.txt
Mozlint could read this file and automatically exclude all those paths from its path filtering mechanism. We'd probably need to add an --exclude-file argument to mozlint.
Comment 1•7 years ago
|
||
We probably want to combine this with bug 1366714 - at least for ESLint. Mainly so that we can get editor integration supported as well.
Assignee | ||
Comment 2•7 years ago
|
||
So tools/rewriting/ThirdPartyPaths.txt is meant to list all 3rd party modules. E.g, if a new module is added to /third_party, we need to remember to explicitly update the list, or it will be missed. I think it's serving a different purpose than what mozlint needs.
I think this would be a perfect application for the Files Metadata system in moz.build. We could create rules like:
with Files("third_party/**"):
THIRD_PARTY = True
I'll file a new bug to get the annotations added that blocks this. Then we can make this bug about getting |mach lint| to query 3rd party paths and automatically pass them in via the 'exclude' directive. I think this should be handled outside of .eslintignore, because we want these to be excluded for all linters.
Note: we may want to avoid querying this metadata every time. Maybe we can write a mechanism to generate a file of paths to exclude and only re-generate when we need to.
Summary: [mozlint] Automatically exclude paths from /tools/rewriting/ThirdPartyPaths.txt → [mozlint] Automatically exclude 3rd party paths
Updated•7 years ago
|
Product: Testing → Firefox Build System
Assignee | ||
Comment 3•6 years ago
|
||
While the moz.yaml proposal this depends on would be a better solution, let's just exclude ThirdPartyPaths.txt for now. We can switch to whatever new mechanism we come up with later.
Assignee: nobody → ahal
Status: NEW → ASSIGNED
Assignee | ||
Comment 4•6 years ago
|
||
Pushed by ahalberstadt@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/1635530c393a
[mozlint] Globally exclude paths listed in tools/rewriting/ThirdPartyPaths.txt from our linters, r=sylvestre
Comment 6•6 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
status-firefox64:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla64
Updated•2 years ago
|
Product: Firefox Build System → Developer Infrastructure
You need to log in
before you can comment on or make changes to this bug.
Description
•