From: epriestley Date: Sat, 18 Jan 2014 05:30:18 +0000 (-0800) Subject: Call willLintPath() hook from PhutilLinter X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=a247e2109394f9b235e07d02c6c0e12b5cd52e26;p=arcanist.git Call willLintPath() hook from PhutilLinter Summary: Some callpaths end up here, which doesn't cause the internal linter's willLintPath() method. This can mean its `activePath` is set wrong, which results in us raising lint for the wrong file. Particularly, if you apply D7979 (diff 18069) and `arc lint` it, you'll get a syntax error message in the wrong file. Test Plan: Applied D7979 and linted it, got proper error message. Reviewers: btrahan Reviewed By: btrahan CC: aarwine, aran Differential Revision: https://secure.phabricator.com/D7988 --- diff --git a/src/lint/linter/ArcanistPhutilXHPASTLinter.php b/src/lint/linter/ArcanistPhutilXHPASTLinter.php index f7c6686c..00529efa 100644 --- a/src/lint/linter/ArcanistPhutilXHPASTLinter.php +++ b/src/lint/linter/ArcanistPhutilXHPASTLinter.php @@ -77,6 +77,11 @@ final class ArcanistPhutilXHPASTLinter extends ArcanistBaseXHPASTLinter { return $this->xhpastLinter->buildFutures($paths); } + public function willLintPath($path) { + $this->xhpastLinter->willLintPath($path); + return parent::willLintPath($path); + } + protected function resolveFuture($path, Future $future) { $tree = $this->xhpastLinter->getXHPASTTreeForPath($path); if (!$tree) {