HomePhabricator

Allow getXHPASTTreeForPath to return the tree for an arbitrary path

Description

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

Details