mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-11-10 00:42:40 +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:
parent
111b9b035a
commit
6f7bedaceb
2 changed files with 8 additions and 4 deletions
|
@ -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;
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue