Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15399671
D14499.id35074.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
876 B
Referenced Files
None
Subscribers
None
D14499.id35074.diff
View Options
diff --git a/src/lint/linter/xhpast/rules/ArcanistBraceFormattingXHPASTLinterRule.php b/src/lint/linter/xhpast/rules/ArcanistBraceFormattingXHPASTLinterRule.php
--- a/src/lint/linter/xhpast/rules/ArcanistBraceFormattingXHPASTLinterRule.php
+++ b/src/lint/linter/xhpast/rules/ArcanistBraceFormattingXHPASTLinterRule.php
@@ -61,10 +61,17 @@
}
$type = $parent->getTypeName();
- if ($type != 'n_STATEMENT_LIST' && $type != 'n_DECLARE') {
- $this->raiseLintAtNode(
- $node,
- pht('Use braces to surround a statement block.'));
+ switch ($type) {
+ case 'n_DECLARE':
+ case 'n_NAMESPACE':
+ case 'n_STATEMENT_LIST':
+ break;
+
+ default:
+ $this->raiseLintAtNode(
+ $node,
+ pht('Use braces to surround a statement block.'));
+ break;
}
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Mar 18, 6:37 AM (6 d, 7 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7704064
Default Alt Text
D14499.id35074.diff (876 B)
Attached To
Mode
D14499: Fix brace formatting linter rule after XHPAST changes
Attached
Detach File
Event Timeline
Log In to Comment