Groovy Documentation

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

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

class ForLoopShouldBeWhileLoopRule
extends AbstractAstVisitorRule

For loops where init and update statements are empty can be simplified to while loops. Ignores For-Each Loops (for (Plan p : plans) { .. }) and Groovy For Loops (for (p in plans) { .. }).

Authors:
Victor Savkin


Property Summary
Class astVisitorClass

String name

int priority

 

Property Detail

astVisitorClass

Class astVisitorClass


name

String name


priority

int priority


 

Groovy Documentation