Closed Bug 1740598 Opened 3 years ago Closed 2 years ago

./mach lint --fix -r . prints "linting the entire repo takes a long time"

Categories

(Developer Infrastructure :: Lint and Formatting, task, P3)

Tracking

(firefox113 fixed)

RESOLVED 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.

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

Mentor: ahal
Severity: -- → S4
Keywords: good-first-bug
Priority: -- → P3

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.

Severity: S4 → S3
Product: Firefox Build System → Developer Infrastructure
Assignee: nobody → sphink
Status: NEW → ASSIGNED
Pushed by sfink@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/2f0d6458985a When linting, process only the given revision when --rev is present r=ahal
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: