Open Bug 1571684 Opened 2 months ago Updated 15 days ago

Avoid `./mach lint error: problem with lint setup, skipping android-api-lint, android-checkstyle, android-findbugs, android-lint, android-test` on Desktop builds

Categories

(Firefox Build System :: Lint and Formatting, task, P2)

Tracking

(Not tracked)

People

(Reporter: ato, Unassigned)

Details

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.

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?

Flags: needinfo?(nalexander)

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

Flags: needinfo?(nalexander)
Summary: ./mach lint error: problem with lint setup, skipping android-api-lint, android-checkstyle, android-findbugs, android-lint, android-test → Avoid `./mach lint error: problem with lint setup, skipping android-api-lint, android-checkstyle, android-findbugs, android-lint, android-test` on Desktop builds

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.

(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).

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

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.

Priority: -- → P2
You need to log in before you can comment on or make changes to this bug.