mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-11-26 00:32:41 +01:00
Allow pht(<<<HEREDOC ... HEREDOC)
Summary: Don't raise lint on heredoc literals. Test Plan: Linted pht() + heredoc in D4477. Reviewers: vrana, btrahan Reviewed By: vrana CC: aran Differential Revision: https://secure.phabricator.com/D4478
This commit is contained in:
parent
90129c5432
commit
a39b591c95
1 changed files with 6 additions and 1 deletions
|
@ -294,8 +294,13 @@ final class ArcanistXHPASTLinter extends ArcanistLinter {
|
|||
continue;
|
||||
}
|
||||
|
||||
// TODO: Desceptively, n_STRING_SCALAR may include variables, mostly
|
||||
// because I was lazy when implementing the parser. We should perform more
|
||||
// strict checks here, and/or enhance the parser.
|
||||
|
||||
$identifier = $parameters->getChildByIndex(0);
|
||||
if ($identifier->getTypeName() == 'n_STRING_SCALAR') {
|
||||
if ($identifier->getTypeName() == 'n_STRING_SCALAR' ||
|
||||
$identifier->getTypeName() == 'n_HEREDOC') {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue