Groovy Documentation

groovy.org.codenarc.rule.basic
[Groovy] Class ConstantTernaryExpressionRule

java.lang.Object
  org.codenarc.rule.AbstractAstVisitorRule
      groovy.org.codenarc.rule.basic.ConstantTernaryExpressionRule

class ConstantTernaryExpressionRule
extends AbstractAstVisitorRule

Rule that checks for ternary expressions with a constant value for the boolean expression, such as:

Also checks for the same types of constant values for the boolean expressions within the "short" ternary expressions, also known as the "Elvis" operator, e.g.:
Authors:
Chris Mair


Property Summary
Class astVisitorClass

String name

int priority

 

Property Detail

astVisitorClass

Class astVisitorClass


name

String name


priority

int priority


 

Groovy Documentation