1
0
Fork 0
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:
Evan Priestley 2012-01-17 17:16:08 -08:00
commit 293b91d6b5
2 changed files with 7 additions and 0 deletions

View file

@ -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) {

View file

@ -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();