Skip to content

Latest commit

 

History

History
18 lines (12 loc) · 1.08 KB

BracesForIfElse.md

File metadata and controls

18 lines (12 loc) · 1.08 KB

Pattern: Malformed brace for if

Issue: -

Description

Checks the location of the opening brace ({) for if statements. By default, requires them on the same line, but the sameLine property can be set to false to override this.

Property Description Default Value
sameLine If true, then the opening brace ({) for if statement should be on the same line. true
validateElse To enable else checking, set the property to true false
elseOnSameLineAsClosingBrace If true, then the else statement should be on the same line as closing brace (}) the same as sameLine
elseOnSameLineAsOpeningBrace If true, then the else statement should be on the same line as opening brace ({) the same as sameLine

Further Reading