./mach lint --fix -r . prints "linting the entire repo takes a long time"
Categories
(Developer Infrastructure :: Lint and Formatting, task, P3)
Tracking
(firefox113 fixed)
Tracking | Status | |
---|---|---|
firefox113 | --- | fixed |
People
(Reporter: mstange, Assigned: sfink, Mentored)
Details
(Keywords: good-first-bug)
Attachments
(1 file)
According to ./mach lint --help
, there is a -r REVISION
flag.
I use the following command to fix any formatting mistakes in files that are touched by the workdir revision: ./mach lint --fix -r .
% ./mach lint --fix -r .
warning: linting the entire repo takes a long time, using --outgoing and --workdir instead. If you want to lint the entire repo, run `./mach lint .`
error: problem with lint setup, skipping android-api-lint, android-checkstyle, android-format, android-javadoc, android-lint, android-test
✖ 0 problems (0 errors, 0 warnings, 5 fixed)
It prints a warning but completes fairly quickly. It does not lint the entire repo.
Comment 1•3 years ago
|
||
Thanks for filing, noticed this myself the other day. I think we just need to add or rev
here:
https://searchfox.org/mozilla-central/source/python/mozlint/mozlint/cli.py#354
Comment 2•3 years ago
|
||
Actually this is a bit more than an erroneous error message, as it looks like we actually set outgoing
and workdir
in that if statement.
So basically whenever you pass --rev
, we also lint any outgoing files and files in the working directory. Not the end of the world, but doing more work than the user requested, and might cause confusion if errors turn up in a file that wasn't modified by the specified revision.
Updated•2 years ago
|
Assignee | ||
Updated•2 years ago
|
Assignee | ||
Comment 3•2 years ago
|
||
Comment 5•2 years ago
|
||
bugherder |
Description
•