Page MenuHomePhabricator

Arcanist requires external linters to be installed even if they are not used
Closed, ResolvedPublic

Description

Currently, arc lint will construct the ArcanistLintEngine (and add all ArcanistLinter instances) before actually performing the linting. An unfortunate result of this is that the user will require all external linters to be installed, even if they have not modified any files which requires those linters.

For example, suppose that a user modifies README.txt and executes arc diff. Suppose that the repository is configured to lint *.json files with ArcanistJSONLintLinter (which requires the external jsonlint binary to be installed). In this case, arc diff will fail if the user does not have ArcanistJSONLintLinter installed, even though it should not technically be required.

Event Timeline

joshuaspence raised the priority of this task from to Needs Triage.
joshuaspence updated the task description. (Show Details)
joshuaspence added a project: Arcanist.
joshuaspence added a subscriber: joshuaspence.
joshuaspence renamed this task from Arcanist requires external linters to be installed even if they are not used. to Arcanist requires external linters to be installed even if they are not used.Jul 9 2014, 4:12 PM

I have a suspicion that the ArcanistConfigurationDrivenLintEngine does a much better job of this than the ArcanistComprehensiveLintEngine, for example. I say this because I looked at fixing this a while ago and gave up, whereas D9843: Don't build unused linters for the `ArcanistConfigurationDrivenLintEngine` is quite a simple fix AFAICT.