mirror of
https://we.phorge.it/source/arcanist.git
synced 2025-01-11 07:11:03 +01:00
Merge pull request #17 from disqus/improve-linters
Add canRun to linters.
This commit is contained in:
commit
293b91d6b5
2 changed files with 7 additions and 0 deletions
|
@ -183,6 +183,9 @@ abstract class ArcanistLintEngine {
|
|||
|
||||
foreach ($linters as $linter) {
|
||||
$linter->setEngine($this);
|
||||
if (!$linter->canRun()) {
|
||||
continue;
|
||||
}
|
||||
$paths = $linter->getPaths();
|
||||
|
||||
foreach ($paths as $key => $path) {
|
||||
|
|
|
@ -186,6 +186,10 @@ abstract class ArcanistLinter {
|
|||
$this->activePath = $path;
|
||||
}
|
||||
|
||||
public function canRun() {
|
||||
return true;
|
||||
}
|
||||
|
||||
abstract public function willLintPaths(array $paths);
|
||||
abstract public function lintPath($path);
|
||||
abstract public function getLinterName();
|
||||
|
|
Loading…
Reference in a new issue