Avoid `./mach lint error: problem with lint setup, skipping android-api-lint, android-checkstyle, android-findbugs, android-lint, android-test` on Desktop builds
Categories
(Developer Infrastructure :: Lint and Formatting, task, P2)
Tracking
(firefox137 fixed)
Tracking | Status | |
---|---|---|
firefox137 | --- | fixed |
People
(Reporter: ato, Assigned: ahal)
Details
Attachments
(1 file)
When running the linter on the remote/ subfolder, the error seen below is consistent:
% ./mach lint -funix remote/
error: problem with lint setup, skipping android-api-lint, android-checkstyle, android-findbugs, android-lint, android-test
Let me know if there’s any other information I can provide.
Assignee | ||
Comment 1•6 years ago
|
||
I see this too, these checks were recently added to mozlint. I think this behaviour might be expected, but the message is confusing. Needinfo Nick just to verify. Should we suppress the error message in the case of these linters?
Comment 2•6 years ago
|
||
(In reply to Andrew Halberstadt [:ahal] from comment #1)
I see this too, these checks were recently added to mozlint. I think this behaviour might be expected, but the message is confusing. Needinfo Nick just to verify.
Yes, it's expected.
Should we suppress the error message in the case of these linters?
At the 11th hour I removed the "per-linter" error message, thinking it would be confusing to Desktop folks. But I didn't change the "harness-level" message. Let's change this to include some "condition" mechanism so that these can be ignored in some circumstances.
Comment 3•6 years ago
|
||
Does this also do any kind of network call? (After the initial run to install ESLint and the plugins). When I'm offline, I notice mach lint --fix path/to/file.js
taking a while before printing that error. Online, it takes a few seconds.
Assignee | ||
Comment 4•6 years ago
|
||
(In reply to Lina Cambridge (she/her) [:lina] from comment #3)
Does this also do any kind of network call? (After the initial run to install ESLint and the plugins). When I'm offline, I notice
mach lint --fix path/to/file.js
taking a while before printing that error. Online, it takes a few seconds.
I'm not sure about these android ones, but yes several linters will try to make network calls. For example, to install dependencies or clone a repo (in the case of the l10n
linter).
Comment 5•6 years ago
|
||
(In reply to Andrew Halberstadt [:ahal] from comment #4)
(In reply to Lina Cambridge (she/her) [:lina] from comment #3)
Does this also do any kind of network call? (After the initial run to install ESLint and the plugins). When I'm offline, I notice
mach lint --fix path/to/file.js
taking a while before printing that error. Online, it takes a few seconds.I'm not sure about these android ones, but yes several linters will try to make network calls. For example, to install dependencies or clone a repo (in the case of the
l10n
linter).
The setup for the Android lints should not require a network. The runtime will, since it's all based on Gradle, which dynamically fetches dependencies as needed.
Reporter | ||
Comment 6•6 years ago
•
|
||
I think this pre-lint error is confusing because it can (especially
when run in Unix formatting mode) be mistaken for a lint problem.
Edit:
For example, consider this extract when dependencies are not
installed:
https://gist.github.com/andreastt/c2120a84451da18e69c6bc6cacfde844
In this case, there are no actual lint problems.
Assignee | ||
Updated•5 years ago
|
Comment 7•5 years ago
|
||
Can we avoid running these linters when no android-related files were modified? I assume they only do something meaningful for code in mobile/android
and/or java files. Both not getting this error and avoiding additional lag without a network connection (per comment #5) would be helpful. I'm happy to help writing a patch but atm I have no idea where this code lives...
Assignee | ||
Comment 8•5 years ago
|
||
Sure, though it's going to be tricky to implement that. I filed bug 1597277 which contains an explanation.
Also just to split hairs a little, we already do avoid running linters that don't have any files modified. It's just the setup
functions that will run regardless. Unfortunately it's these setup
functions that normally hit the network and print this Android error.
Updated•3 years ago
|
Updated•2 years ago
|
Comment 9•2 years ago
|
||
Could be nice, as well, when one tries to mach linter --setup
to know why it is failing to perform the setup for Android: in my case, because I'm building desktop (though I have android changes in my patch)
Assignee | ||
Updated•19 days ago
|
Assignee | ||
Comment 10•19 days ago
|
||
Updated•15 days ago
|
Comment 11•15 days ago
|
||
Comment 12•15 days ago
|
||
bugherder |
Description
•