1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2024-11-22 06:42:41 +01:00

Fix linter config check

Summary: Fixes T6311 and T5124 by returning all configured linters from `buildLinter()`, and making `ArcanistExternalLinter::checkBinaryConfiguration()` not crash if there's no executable to run.

Test Plan: `arc linters` in rP shows "Configured" and "ERROR" as appropriate; Adding a broken linter to `.arclint` in rARC doesn't invoke it's not actually needed, and prints error if it is.

Reviewers: joshuaspence, epriestley, #blessed_reviewers

Reviewed By: joshuaspence, epriestley, #blessed_reviewers

Subscribers: Korvin, epriestley

Maniphest Tasks: T6311

Differential Revision: https://secure.phabricator.com/D10773
This commit is contained in:
Aviv Eyal 2015-05-05 14:03:01 -07:00 committed by epriestley
parent 111b9b035a
commit 6f7bedaceb
2 changed files with 8 additions and 4 deletions

View file

@ -129,10 +129,8 @@ final class ArcanistConfigurationDrivenLintEngine extends ArcanistLintEngine {
"%s\n",
pht("Found %d matching paths for linter '%s'.", count($paths), $name));
if ($paths) {
$linter->setPaths($paths);
$built_linters[] = $linter;
}
$linter->setPaths($paths);
$built_linters[] = $linter;
}
return $built_linters;

View file

@ -299,6 +299,12 @@ abstract class ArcanistExternalLinter extends ArcanistFutureLinter {
}
public function getCacheVersion() {
try {
$this->checkBinaryConfiguration();
} catch (ArcanistMissingLinterException $e) {
return null;
}
$version = $this->getVersion();
if ($version) {