]> khamidou — GitHub mirrors - arcanist.git/commit
Allow getXHPASTTreeForPath to return the tree for an arbitrary path
authorJoshua Spence <josh@joshuaspence.com>
Thu, 21 May 2015 05:06:04 +0000 (15:06 +1000)
committerJoshua Spence <josh@joshuaspence.com>
Thu, 21 May 2015 05:08:39 +0000 (15:08 +1000)
commit26c4f12a21170f3001c228f4394b16411a4b4ac1
tree29900abedf2fc5c38e9d88a7d4e100fcac577237
parente72a43a992471294ce28fdd4eb561de31daf45c4
Allow getXHPASTTreeForPath to return the tree for an arbitrary path

Summary: This allows `ArcanistBaseXHPASTLinter::getXHPASTTreeForPath` to return the parse tree for a file that wasn't explicitly linted. In my particular use case, I am writing a linter rule to determine if it is necessary to import a PHP file with `require_once` (i.e. the file consists only of class/interface definitions which are autoloadable).

Test Plan: Tested externally using a custom linter.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin, epriestley

Differential Revision: https://secure.phabricator.com/D12271
src/lint/linter/ArcanistBaseXHPASTLinter.php