Package: groovy.org.codenarc.rule.formatting

## [Groovy] Class BracesForIfElseRule

- groovy.org.codenarc.rule.formatting.BracesForIfElseRule

- Checks the location of the opening brace ({) for if statements and optionally closing and opening braces for else statements. By default, requires them on the same line, but the sameLine property can be set to false to override this. To enable else checking, set the validateElse property to true. For more fine grained control, use boolean properties elseOnSameLineAsClosingBrace and elseOnSameLineAsOpeningBrace Example:

       if (x) {     //A

       } else if (y) { //B

       } else {    //C

       }

  A - checked and defaults to no errors since the brace is on the same line
  B - checked if option validateElse is set to true. Validation result controlled by boolean options elseOnSameLineAsClosingBrace and elseOnSameLineAsOpeningBrace C - same as B
  Authors:
    Hamlet D'Arcy
    Geli Crick
    Matias Bjarland

- - ### Properties Summary

    Properties
    Type | Name and description
    --- | ---
    `Class` | `astVisitorClass`
    `Boolean` | `elseOnSameLineAsClosingBrace`
    `Boolean` | `elseOnSameLineAsOpeningBrace`
    `String` | `name`
    `int` | `priority`
    `boolean` | `sameLine`
    `boolean` | `validateElse`

- - ### Property Detail

    - #### Class astVisitorClass

    - #### Boolean elseOnSameLineAsClosingBrace

    - #### Boolean elseOnSameLineAsOpeningBrace

    - #### String name

    - #### int priority

    - #### boolean sameLine

    - #### boolean validateElse