From 04d788c79ed496a548d8ca4780d7749e62fe1d37 Mon Sep 17 00:00:00 2001 From: Joshua Spence Date: Thu, 25 Jun 2015 07:09:17 +1000 Subject: [PATCH] Ensure that a space is used after a catch token Summary: For consistency, a single space should separate `catch` and the following parenthetical expression. Test Plan: Added test case. Reviewers: epriestley, #blessed_reviewers Reviewed By: epriestley, #blessed_reviewers Subscribers: epriestley, Korvin Differential Revision: https://secure.phabricator.com/D13389 --- .../__tests__/xhpast/space-after-control-keywords.lint-test | 5 +++++ .../ArcanistControlStatementSpacingXHPASTLinterRule.php | 1 + 2 files changed, 6 insertions(+) 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 index 444a052f..57cb4aaa 100644 --- 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 @@ if ($x) { do { echo 1; } while(true); + +try {} catch(Exception $ex) {} ~~~~~~~~~~ warning:2:1 warning:2:10 @@ -37,6 +39,7 @@ warning:10:16 warning:13:3 warning:14:3 warning:24:3 +warning:26:8 ~~~~~~~~~~ getNonsemanticTokensAfter(); if (empty($after)) { $this->raiseLintAtToken( -- 2.43.0