Groovy Documentation

groovy.org.codenarc.rule.formatting
[Groovy] Class SpaceAroundOperatorRule

java.lang.Object
  org.codenarc.rule.AbstractAstVisitorRule
      groovy.org.codenarc.rule.formatting.SpaceAroundOperatorRule

class SpaceAroundOperatorRule
extends AbstractAstVisitorRule

Check that there is at least one space (blank) or whitespace around each binary operator, including: +, -, *, /, >>, <<, &&, ||, &, |, ?:, =, as. Do not check dot ('.') operator. Do not check unary operators (!, +, -, ++, --, ?.). Do not check array ('[') operator. Known limitation: Does not catch violations of missing space around equals operator (=) within a declaration expression, e.g. def x=23 Known limitation: Does not catch violations of certain ternary expressions.

Authors:
Chris Mair


Property Summary
Class astVisitorClass

String name

int priority

 

Property Detail

astVisitorClass

Class astVisitorClass


name

String name


priority

int priority


 

Groovy Documentation