Inspectopedia Help

Potentially confusing code constructs

Clashing getters  

Reports boolean methods which can be accessed via the same property name.

Clashing trait methods  

Reports classes which implement two or more traits that contain methods with same signatures.

Deprecated API usage  

Reports references to deprecated classes, fields, and methods.

Double negation  

Reports double negation that can be simplified.

GString map key  

Reports statements which use a groovy.lang.GString object as a key to map.

Implicit null argument  

Reports calls with no arguments to method that has exactly one parameter.

Local variable is reassigned in closure or anonymous class  

Reports local variables assigned to expression with different type inside of closure or anonymous class.

Negated conditional expression  

Reports conditional expressions whose conditions are negated.

Negated if condition expression  

Reports if statements which contain else branches and whose conditions are negated.

Nested conditional expression  

Reports ternary conditional expressions that are nested inside other conditional expressions.

Nested switch statement  

Reports switch statements that are nested inside other switch statements.

New instance of class annotated with @groovy.lang.Singleton  

Reports new instance creation of classes annotated with @groovy.lang.Singleton.

Octal integer  

Reports octal integer literals.

Overly complex arithmetic expression  

Reports arithmetic expressions with too many terms.

Overly complex boolean expression  

Reports boolean expressions with too many terms.

Package mismatch  

Reports files with a declared package that does not match the package expected.

Pointless arithmetic expression  

Reports pointless arithmetic expressions.

Pointless boolean expression  

Reports pointless or pointlessly complicated boolean expressions.

Result of increment or decrement used  

Reports increment or decrement expressions nested inside other expressions.

Statement with empty body  

Reports if, while, do or for statements with empty bodies.

Unnecessary qualified reference  

Reports fully qualified references, which can be replaced with import.

Last modified: 18 June 2024