Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F13982951
D10569.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D10569.diff
View Options
diff --git a/src/lint/linter/ArcanistXHPASTLinter.php b/src/lint/linter/ArcanistXHPASTLinter.php
--- a/src/lint/linter/ArcanistXHPASTLinter.php
+++ b/src/lint/linter/ArcanistXHPASTLinter.php
@@ -2736,6 +2736,10 @@
$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
--- a/src/lint/linter/__tests__/xhpast/array-comma.lint-test
+++ b/src/lint/linter/__tests__/xhpast/array-comma.lint-test
@@ -15,6 +15,11 @@
'foo',
array('foo')
);
+array(
+ 'foo' => <<<EOTEXT
+This is some heredoc text.
+EOTEXT
+);
~~~~~~~~~~
advice:3:14
advice:12:3
@@ -37,3 +42,8 @@
'foo',
array('foo'),
);
+array(
+ 'foo' => <<<EOTEXT
+This is some heredoc text.
+EOTEXT
+);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Oct 21, 3:09 AM (3 w, 2 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6726682
Default Alt Text
D10569.diff (1 KB)
Attached To
Mode
D10569: Fix `LINT_ARRAY_SEPARATOR` for heredocs
Attached
Detach File
Event Timeline
Log In to Comment