diff --git a/src/lint/linter/xhpast/rules/ArcanistParenthesesSpacingXHPASTLinterRule.php b/src/lint/linter/xhpast/rules/ArcanistParenthesesSpacingXHPASTLinterRule.php --- a/src/lint/linter/xhpast/rules/ArcanistParenthesesSpacingXHPASTLinterRule.php +++ b/src/lint/linter/xhpast/rules/ArcanistParenthesesSpacingXHPASTLinterRule.php @@ -18,10 +18,11 @@ 'n_ARRAY_VALUE_LIST', 'n_ASSIGNMENT_LIST', 'n_CALL_PARAMETER_LIST', - 'n_DECLARATION_PARAMETER_LIST', 'n_CONTROL_CONDITION', + 'n_DECLARATION_PARAMETER_LIST', 'n_FOR_EXPRESSION', 'n_FOREACH_EXPRESSION', + 'n_LEXICAL_VARIABLE_LIST', )); foreach ($all_paren_groups as $group) { diff --git a/src/lint/linter/xhpast/rules/ArcanistVariableReferenceSpacingXHPASTLinterRule.php b/src/lint/linter/xhpast/rules/ArcanistVariableReferenceSpacingXHPASTLinterRule.php --- a/src/lint/linter/xhpast/rules/ArcanistVariableReferenceSpacingXHPASTLinterRule.php +++ b/src/lint/linter/xhpast/rules/ArcanistVariableReferenceSpacingXHPASTLinterRule.php @@ -24,7 +24,9 @@ if ($before) { $this->raiseLintAtOffset( head($before)->getOffset(), - pht('Variable references should not be prefixed with whitespace.'), + pht( + 'For consistency, variable references should not be '. + 'prefixed with whitespace.'), implode('', mpull($before, 'getValue')), ''); } diff --git a/src/lint/linter/xhpast/rules/__tests__/parentheses-spacing/closure.lint-test b/src/lint/linter/xhpast/rules/__tests__/parentheses-spacing/closure.lint-test new file mode 100644 --- /dev/null +++ b/src/lint/linter/xhpast/rules/__tests__/parentheses-spacing/closure.lint-test @@ -0,0 +1,12 @@ +