From: Joshua Spence Date: Mon, 7 Dec 2015 20:20:57 +0000 (+0000) Subject: Improve brace formatting linter rule X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=a6e81daad1bbd470c1907a7ea705b2e084fc07dd;p=arcanist.git Improve brace formatting linter rule Summary: Allow the brace formatting linter rule to complain about `class X{}`. Test Plan: Updated unit tests. Reviewers: epriestley, #blessed_reviewers Reviewed By: epriestley, #blessed_reviewers Subscribers: Korvin Differential Revision: https://secure.phabricator.com/D14690 --- diff --git a/src/lint/linter/xhpast/rules/ArcanistBraceFormattingXHPASTLinterRule.php b/src/lint/linter/xhpast/rules/ArcanistBraceFormattingXHPASTLinterRule.php index 0a8c33b7..775c6f18 100644 --- a/src/lint/linter/xhpast/rules/ArcanistBraceFormattingXHPASTLinterRule.php +++ b/src/lint/linter/xhpast/rules/ArcanistBraceFormattingXHPASTLinterRule.php @@ -24,14 +24,6 @@ final class ArcanistBraceFormattingXHPASTLinterRule if (!$before) { $first = head($tokens); - // Only insert the space if we're after a closing parenthesis. If - // we're in a construct like "else{}", other rules will insert space - // after the 'else' correctly. - $prev = $first->getPrevToken(); - if (!$prev || $prev->getValue() !== ')') { - continue; - } - $this->raiseLintAtToken( $first, pht( diff --git a/src/lint/linter/xhpast/rules/__tests__/brace-formatting/brace-formatting.lint-test b/src/lint/linter/xhpast/rules/__tests__/brace-formatting/brace-formatting.lint-test deleted file mode 100644 index 725773f3..00000000 --- a/src/lint/linter/xhpast/rules/__tests__/brace-formatting/brace-formatting.lint-test +++ /dev/null @@ -1,87 +0,0 @@ -