mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-11-26 08:42:40 +01:00
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
This commit is contained in:
parent
7ce0c8e84e
commit
a247e21093
1 changed files with 5 additions and 0 deletions
|
@ -77,6 +77,11 @@ final class ArcanistPhutilXHPASTLinter extends ArcanistBaseXHPASTLinter {
|
||||||
return $this->xhpastLinter->buildFutures($paths);
|
return $this->xhpastLinter->buildFutures($paths);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function willLintPath($path) {
|
||||||
|
$this->xhpastLinter->willLintPath($path);
|
||||||
|
return parent::willLintPath($path);
|
||||||
|
}
|
||||||
|
|
||||||
protected function resolveFuture($path, Future $future) {
|
protected function resolveFuture($path, Future $future) {
|
||||||
$tree = $this->xhpastLinter->getXHPASTTreeForPath($path);
|
$tree = $this->xhpastLinter->getXHPASTTreeForPath($path);
|
||||||
if (!$tree) {
|
if (!$tree) {
|
||||||
|
|
Loading…
Reference in a new issue