| Class | Description |
|---|---|
| CompileStaticRule | Enforces classes are annotated either with one of the CompileStatic, GrailsCompileStatic or CompileDynamic annotations |
| CompileStaticlVisitor | |
| ConfusingTernaryAstVisitor | |
| ConfusingTernaryRule | In an "if" expression with an "else" clause, avoid negation in the test. |
| CouldBeElvisAstVisitor | |
| CouldBeElvisRule | Catch an if block that could be written as an elvis expression. |
| CouldBeSwitchStatementAstVisitor | |
| CouldBeSwitchStatementRule | Checks for multiple if statements that could be converted to a switch |
| FieldTypeRequiredAstVisitor | |
| FieldTypeRequiredRule | Checks that field types are explicitly specified (and not using def) |
| HashtableIsObsoleteRule | Check for direct use of Vector or java.util.Hashtable. |
| IfStatementCouldBeTernaryAstVisitor | |
| IfStatementCouldBeTernaryRule | Checks for: |
| ImplicitClosureParameterAstVisitor | |
| ImplicitClosureParameterCodeVisitor | |
| ImplicitClosureParameterRule | Checks that the implicit it closure parameter is not used and that parameters are declared explicitly instead |
| ImplicitReturnStatementAstVisitor | |
| ImplicitReturnStatementRule | Checks for methods that are missing an explicit return statement. |
| InvertedConditionAstVisitor | |
| InvertedConditionRule | An inverted condition is one where a constant expression is used on the left hand side of the equals comparision. |
| InvertedIfElseAstVisitor | |
| InvertedIfElseRule | An inverted if-else statement is one in which there is a single if statement with a single else branch and the boolean test of the if is negated. |
| LongLiteralWithLowerCaseLAstVisitor | |
| LongLiteralWithLowerCaseLRule | In Java and Groovy, you can specify long literals with the L or l character, for instance 55L or 24l. |
| MethodParameterTypeRequired | Checks that method parameters are not dynamically typed, that is they are explicitly stated and different than def. |
| MethodParameterTypeRequiredAstVisitor | |
| MethodReturnTypeRequiredAstVisitor | |
| MethodReturnTypeRequiredRule | Checks that method return types are not dynamic, that they are explicitly stated and different than def. |
| NoDefAstVisitor | |
| NoDefRule | Def keyword is overused and should be replaced with specific type. |
| NoDoubleAstVisitor | |
| NoDoubleRule | Checks for use of the double or Double types, in fields, variables, method parameters and method return types. |
| NoFloatAstVisitor | |
| NoFloatRule | Checks for use of the float or Float types, in fields, variables, method parameters and method return types. |
| NoJavaUtilDateAstVisitor | |
| NoJavaUtilDateRule | Do not use java.util.Date. |
| NoTabCharacterRule | Checks that all source files do not contain the tab character |
| ParameterReassignmentAstVisitor | |
| ParameterReassignmentRule | Checks for a method or closure parameter being reassigned to a new value within the body of the method/closure, which is a confusing, questionable practice. |
| PublicMethodsBeforeNonPublicMethodsAstVisitor | |
| PublicMethodsBeforeNonPublicMethodsRule | Enforce that all public methods are above protected and private methods. |
| StaticFieldsBeforeInstanceFieldsAstVisitor | |
| StaticFieldsBeforeInstanceFieldsRule | Enforce that all static fields are above all instance fields within a class |
| StaticMethodsBeforeInstanceMethodsAstVisitor | |
| StaticMethodsBeforeInstanceMethodsRule | Enforce that all static methods within each visibility level (public, protected, private) are above all instance methods within that same visibility level. |
| TernaryCouldBeElvisAstVisitor | |
| TernaryCouldBeElvisRule | Rule that checks for ternary expressions where the boolean and true expressions are the same. |
| TrailingCommaAstVisitor | |
| TrailingCommaRule | Check whether list and map literals contain optional trailing comma. |
| VariableTypeRequiredAstVisitor | |
| VariableTypeRequiredRule | Checks that variable types are explicitly specified in declarations (and not using def) |
| VectorIsObsoleteRule | Check for direct use of Vector or java.util.Vector. |