diff --git a/src/lint/engine/ArcanistLintEngine.php b/src/lint/engine/ArcanistLintEngine.php --- a/src/lint/engine/ArcanistLintEngine.php +++ b/src/lint/engine/ArcanistLintEngine.php @@ -300,6 +300,7 @@ if ($linter->didStopAllLinters()) { $this->stopped[$path] = $linter_name; } + $linter->didLintPath($path); } } catch (Exception $ex) { $profiler->endServiceCall($call_id, array()); diff --git a/src/lint/linter/ArcanistBaseXHPASTLinter.php b/src/lint/linter/ArcanistBaseXHPASTLinter.php --- a/src/lint/linter/ArcanistBaseXHPASTLinter.php +++ b/src/lint/linter/ArcanistBaseXHPASTLinter.php @@ -107,6 +107,7 @@ * @task sharing */ protected function getXHPASTTreeForPath($path) { + echo "getXHPASTTreeForPath: {$path}\n"; // If we aren't the linter responsible for actually building the parse // trees, go get the tree from that linter. @@ -147,5 +148,12 @@ return idx($this->exceptions, $path); } + public function didLintPath($path) { + echo "didLintPath: {$path}\n"; + if (idx($this->trees, $path)) { + unset($this->trees[$path]); + } + } + } diff --git a/src/lint/linter/ArcanistFutureLinter.php b/src/lint/linter/ArcanistFutureLinter.php --- a/src/lint/linter/ArcanistFutureLinter.php +++ b/src/lint/linter/ArcanistFutureLinter.php @@ -26,6 +26,7 @@ foreach ($this->futures as $path => $future) { $this->willLintPath($path); $this->resolveFuture($path, $future); + $this->didLintPath($path); } } } diff --git a/src/lint/linter/ArcanistLinter.php b/src/lint/linter/ArcanistLinter.php --- a/src/lint/linter/ArcanistLinter.php +++ b/src/lint/linter/ArcanistLinter.php @@ -305,6 +305,10 @@ return; } + public function didLintPath($path) { + // This is a hook. + } + abstract public function lintPath($path); abstract public function getLinterName();