Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15408611
D12519.id30066.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
750 B
Referenced Files
None
Subscribers
None
D12519.id30066.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
@@ -3488,9 +3488,11 @@
foreach ($statements as $statement) {
if ($statement->getParentNode()->getTypeName() == 'n_DECLARE') {
continue;
- }
-
- if ($statement->getSemanticString() == ';') {
+ } else if (count($statement->getChildren()) > 1) {
+ continue;
+ } else if ($statement->getChildByIndex(0)->getTypeName() != 'n_EMPTY') {
+ continue;
+ } else if ($statement->getConcreteString() == ';') {
$this->raiseLintAtNode(
$statement,
self::LINT_UNNECESSARY_SEMICOLON,
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Mar 20, 12:10 AM (3 d, 15 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7712210
Default Alt Text
D12519.id30066.diff (750 B)
Attached To
Mode
D12519: Improve performance of LINT_UNNECESSARY_SEMICOLON
Attached
Detach File
Event Timeline
Log In to Comment