HomePhabricator

Extend `LINT_BRACE_FORMATTING` to warn on missing braces

Description

Extend LINT_BRACE_FORMATTING to warn on missing braces

Summary: Extend the ArcanistXHPASTLinter::LINT_BRACE_FORMATTING rule to raise a warning when n_STATEMENT is used without having n_STATEMENT_LIST as a parent. Essentially, this means that if ($x) { do_y(); } is preferred over if ($x) do_y();.

Test Plan: Added some test cases.

Reviewers: epriestley, Blessed Reviewers

Reviewed By: epriestley, Blessed Reviewers

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D10571

Details

Provenance
joshuaspenceAuthored on
joshuaspencePushed on Dec 8 2014, 12:34 PM
Reviewer
Blessed Reviewers
Differential Revision
D10571: Extend `LINT_BRACE_FORMATTING` to warn on missing braces
Parents
rARCb46d4ed4ad01: Update lint engine documentation
Branches
Unknown
Tags
Unknown