Groovy Documentation

groovy.org.codenarc.rule.unnecessary
[Groovy] Class UnnecessaryReturnKeywordRule

java.lang.Object
  org.codenarc.rule.AbstractAstVisitorRule
      groovy.org.codenarc.rule.unnecessary.UnnecessaryReturnKeywordRule

class UnnecessaryReturnKeywordRule
extends AbstractAstVisitorRule

In Groovy, the return keyword is often optional. If a statement is the last line in a method or closure then you do not need to have the return keyword.

Authors:
Hamlet D'Arcy


Property Summary
Class astVisitorClass

String name

int priority

 

Property Detail

astVisitorClass

Class astVisitorClass


name

String name


priority

int priority


 

Groovy Documentation