Page MenuHomePhabricator

D13389.diff
No OneTemporary

D13389.diff

diff --git a/src/lint/linter/__tests__/xhpast/space-after-control-keywords.lint-test b/src/lint/linter/__tests__/xhpast/space-after-control-keywords.lint-test
--- a/src/lint/linter/__tests__/xhpast/space-after-control-keywords.lint-test
+++ b/src/lint/linter/__tests__/xhpast/space-after-control-keywords.lint-test
@@ -22,6 +22,8 @@
do {
echo 1;
} while(true);
+
+try {} catch(Exception $ex) {}
~~~~~~~~~~
warning:2:1
warning:2:10
@@ -37,6 +39,7 @@
warning:13:3
warning:14:3
warning:24:3
+warning:26:8
~~~~~~~~~~
<?php
if ($x) {} else {}
@@ -57,3 +60,5 @@
do {
echo 1;
} while (true);
+
+try {} catch (Exception $ex) {}
diff --git a/src/lint/linter/xhpast/rules/ArcanistControlStatementSpacingXHPASTLinterRule.php b/src/lint/linter/xhpast/rules/ArcanistControlStatementSpacingXHPASTLinterRule.php
--- a/src/lint/linter/xhpast/rules/ArcanistControlStatementSpacingXHPASTLinterRule.php
+++ b/src/lint/linter/xhpast/rules/ArcanistControlStatementSpacingXHPASTLinterRule.php
@@ -23,6 +23,7 @@
case 'T_WHILE':
case 'T_DO':
case 'T_SWITCH':
+ case 'T_CATCH':
$after = $token->getNonsemanticTokensAfter();
if (empty($after)) {
$this->raiseLintAtToken(

File Metadata

Mime Type
text/plain
Expires
Thu, May 9, 7:43 PM (2 w, 3 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6275852
Default Alt Text
D13389.diff (1 KB)

Event Timeline