Groovy Documentation

groovy.org.codenarc.rule.braces
[Groovy] Class ElseBlockBracesRule

java.lang.Object
  org.codenarc.rule.AbstractAstVisitorRule
      groovy.org.codenarc.rule.braces.ElseBlockBracesRule

class ElseBlockBracesRule
extends AbstractAstVisitorRule

Rule that checks that else blocks use braces rather than a single statement.

By default, braces are not required for an else if it is followed immediately by an if. Set the bracesRequiredForElseIf property to true to require braces is that situation as well.

Authors:
Chris Mair


Property Summary
Class astVisitorClass

boolean bracesRequiredForElseIf

String name

int priority

 

Property Detail

astVisitorClass

Class astVisitorClass


bracesRequiredForElseIf

boolean bracesRequiredForElseIf


name

String name


priority

int priority


 

Groovy Documentation