Page MenuHomePhabricator

'arc linters' no longer reports linters as 'Configured', all show as 'Available'
Closed, ResolvedPublic

Description

The output of 'arc linters' no longer correctly differentiates configured linters from available ones.

Having traced this through a little, it looks like the 'built_linters' array at https://secure.phabricator.com/diffusion/ARC/browse/master/src/lint/engine/ArcanistConfigurationDrivenLintEngine.php$46 does not get any entries as '$this->getPaths()' is empty in the Linters workflow.

It feels like the presence or otherwise of a linter should probably not depend on the paths at all.

Steps to reproduce:
Create a .arclint file with the following contents:

{
  "linters": {
    "generated": {
      "type": "generated"
    }
  }
}

Expected output from 'arc linters':

CONFIGURED  generated (Generated Code)

Actual output:

AVAILABLE   generated (Generated Code)

Revisions and Commits

Event Timeline

agenticarus raised the priority of this task from to Needs Triage.
agenticarus updated the task description. (Show Details)
agenticarus added a project: Arcanist.
agenticarus added a subscriber: agenticarus.

buildLinters() in ConfigurationDrivenLintEngine is a derivative of LintEngine, and was used to be used to get all the linters that should run. LintEngine itself is somewhat legacy, and almost all of its use-cases are now covered with ConfigurationDrivenLintEngine.

D9843 was meant to fix T5124, and more specifically, fixing running lint on arcanist/phabricator repos.

A cleaner change would be in https://secure.phabricator.com/diffusion/ARC/browse/master/src/lint/engine/ArcanistLintEngine.php;52947cfd92b331916adffa1ff3233546446c881b$219-226, remove linters that have no paths set, instead of D9843.

An even cleaner one would be to fix ExternalLinter to check if there's something to execute before trying to get a version...

chad triaged this task as Normal priority.Nov 2 2014, 8:00 PM
snoyl8 moved this task from In Progress to Completed on the Arcanist board.
snoyl8 moved this task from Completed to In Progress on the Arcanist board.
snoyl8 moved this task from In Progress to Backlog on the Arcanist board.