Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15369567
D13896.id33544.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
D13896.id33544.diff
View Options
diff --git a/src/lint/linter/ArcanistInlineHTMLXHPASTLinterRule.php b/src/lint/linter/ArcanistInlineHTMLXHPASTLinterRule.php
--- a/src/lint/linter/ArcanistInlineHTMLXHPASTLinterRule.php
+++ b/src/lint/linter/ArcanistInlineHTMLXHPASTLinterRule.php
@@ -22,9 +22,14 @@
continue;
}
+ if (preg_match('/^\s*$/', $html->getValue())) {
+ continue;
+ }
+
$this->raiseLintAtToken(
$html,
pht('PHP files must only contain PHP code.'));
+ break;
}
}
diff --git a/src/lint/linter/__tests__/xhpast/embedded-tags.lint-test b/src/lint/linter/__tests__/xhpast/embedded-tags.lint-test
--- a/src/lint/linter/__tests__/xhpast/embedded-tags.lint-test
+++ b/src/lint/linter/__tests__/xhpast/embedded-tags.lint-test
@@ -2,3 +2,4 @@
This shouldn't fatal the parser.
~~~~~~~~~~
+disabled:2:1
diff --git a/src/lint/linter/__tests__/xhpast/php-tags-bad.lint-test b/src/lint/linter/__tests__/xhpast/php-tags-bad.lint-test
--- a/src/lint/linter/__tests__/xhpast/php-tags-bad.lint-test
+++ b/src/lint/linter/__tests__/xhpast/php-tags-bad.lint-test
@@ -3,6 +3,7 @@
?>
~~~~~~~~~~
+disabled:1:1
error:1:1
~~~~~~~~~~
garbage garbage
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Mar 13, 7:09 AM (1 w, 1 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7386693
Default Alt Text
D13896.id33544.diff (1 KB)
Attached To
Mode
D13896: Improve the "inline HTML" linter rule
Attached
Detach File
Event Timeline
Log In to Comment