Home GnuPG

Extend `LINT_BRACE_FORMATTING` to warn on missing braces
ee2070fadbc5Unpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

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
Joshua Spence <josh@joshuaspence.com>Authored on Dec 8 2014, 1:30 PM
Parents
rARCb46d4ed4ad01: Update lint engine documentation
Branches
Unknown
Tags
Unknown

Event Timeline

Joshua Spence <josh@joshuaspence.com> committed rARCee2070fadbc5: Extend `LINT_BRACE_FORMATTING` to warn on missing braces (authored by Joshua Spence <josh@joshuaspence.com>).Dec 8 2014, 1:30 PM