diff --git a/src/lint/linter/ArcanistXHPASTLinter.php b/src/lint/linter/ArcanistXHPASTLinter.php index bb952d31..2373d772 100644 --- a/src/lint/linter/ArcanistXHPASTLinter.php +++ b/src/lint/linter/ArcanistXHPASTLinter.php @@ -2736,6 +2736,10 @@ final class ArcanistXHPASTLinter extends ArcanistBaseXHPASTLinter { $after = last($value->getTokens())->getNextToken(); if ($multiline && (!$after || $after->getValue() != ',')) { + if ($value->getChildByIndex(1)->getTypeName() == 'n_HEREDOC') { + continue; + } + $this->raiseLintAtNode( $value, self::LINT_ARRAY_SEPARATOR, diff --git a/src/lint/linter/__tests__/xhpast/array-comma.lint-test b/src/lint/linter/__tests__/xhpast/array-comma.lint-test index 74856a04..031f3f3c 100644 --- a/src/lint/linter/__tests__/xhpast/array-comma.lint-test +++ b/src/lint/linter/__tests__/xhpast/array-comma.lint-test @@ -15,6 +15,11 @@ array( 'foo', array('foo') ); +array( + 'foo' => << <<