Page MenuHomePhabricator

D9183.diff
No OneTemporary

D9183.diff

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

File Metadata

Mime Type
text/plain
Expires
Sat, Mar 15, 10:47 AM (2 w, 6 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7690801
Default Alt Text
D9183.diff (1 KB)

Event Timeline