2013-02-14 16:16:08 -08:00
|
|
|
<?php
|
|
|
|
|
|
|
|
abstract class ArcanistFutureLinter extends ArcanistLinter {
|
|
|
|
|
|
|
|
private $futures;
|
|
|
|
|
2013-02-19 13:09:34 -08:00
|
|
|
abstract protected function buildFutures(array $paths);
|
|
|
|
abstract protected function resolveFuture($path, Future $future);
|
2013-02-14 16:16:08 -08:00
|
|
|
|
|
|
|
public function willLintPaths(array $paths) {
|
|
|
|
$this->futures = $this->buildFutures($paths);
|
|
|
|
if (is_array($this->futures)) {
|
|
|
|
foreach ($this->futures as $future) {
|
|
|
|
$future->isReady();
|
|
|
|
}
|
|
|
|
$this->futures = Futures($this->futures);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
public function lintPath($path) {
|
|
|
|
}
|
|
|
|
|
|
|
|
public function didRunLinters() {
|
|
|
|
if ($this->futures) {
|
|
|
|
foreach ($this->futures as $path => $future) {
|
|
|
|
$this->resolveFuture($path, $future);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|