Bug 42728 - Change `./mach lint` so that it makes sense for running in tor-browser and related projects
Merge Info
Related Issues
Backporting
Timeline
-
Immediate: patchset needed as soon as possible -
Next Minor Stable Release: patchset that needs to be verified in nightly before backport -
Eventually: patchset that needs to be verified in alpha before backport -
No Backport (preferred): patchset for the next major stable
Merging
-
Merge to tor-browser
-!fixups
totor-browser
-specific commits, new features, security backports -
Merge to base-browser
-!fixups
tobase-browser
-specific commits, new features to be shared withmullvad-browser
, and security backports-
NOTE: if your changeset includes patches to both
base-browser
andtor-browser
please clearly label in the change description which commits should be cherry-picked tobase-browser
after merging
-
NOTE: if your changeset includes patches to both
Issue Tracking
-
Link resolved issues with appropriate Release Prep issue for changelog generation
Review
Change Description
The original request here was to change tb-dev script, but I tried something different.
I applied some changes to the ./mach lint
CLI directly "deactiivating" linters that we currently don't care about.
I preferred this approach because in my workflow I prefer to use ./mach lint
directly. It is more versatile than tb-dev without having to write any code.
While tb-dev only allows running linter for all changed-files in the current branch, ./mach lint
allows running a subset of linters as desired for any combination of files we want. It can even be combined with tb-dev to run the linters only for changed files if we want... Untested, but something like ./mach lint $(./tools/torbrowser/tb-dev changed-files)
.
I can try to uplift this change as well, by making it less tor-project specific. Not sure why Mozilla would want it, but we never know
If this seems fine, then I will send a separate MR to update the docs over on https://gitlab.torproject.org/tpo/applications/team/-/wikis/Development-Information/Tor-Browser/Contributing-to-Tor-Browser#linting
How Tested
N/A