Inspectopedia Help

Redundant constructs

Name

Language

'when' has only 'else' branch and can be simplified  

Kotlin

Condition of 'if' expression is constant  

Kotlin

Constructor parameter is never used as a property  

Kotlin

Null-checks can be replaced with safe-calls  

Kotlin

Obvious explicit type  

Kotlin

Property is explicitly assigned to constructor parameter  

Kotlin

Redundant '?: return null'  

Kotlin

Redundant 'Companion' reference  

Kotlin

Redundant 'Unit'  

Kotlin

Redundant 'Unit' return type  

Kotlin

Redundant 'constructor' keyword  

Kotlin

Redundant 'if' statement  

Kotlin

Redundant 'inner' modifier  

Kotlin

Redundant 'requireNotNull' or 'checkNotNull' call  

Kotlin

Redundant 'return' label  

Kotlin

Redundant 'suspend' modifier  

Kotlin

Redundant 'with' call  

Kotlin

Redundant SAM constructor  

Kotlin

Redundant argument-based 'let' call  

Kotlin

Redundant backticks  

Kotlin

Redundant call of conversion method  

Kotlin

Redundant call to 'toString()' in string template  

Kotlin

Redundant constructor body  

Kotlin

Redundant creation of lambda or anonymous function  

Kotlin

Redundant curly braces in string template  

Kotlin

Redundant diagnostic suppression  

Kotlin

Redundant double negation  

Kotlin

Redundant empty primary constructor  

Kotlin

Redundant enum constructor invocation  

Kotlin

Redundant explicit 'this'  

Kotlin

Redundant lambda arrow  

Kotlin

Redundant modality modifier  

Kotlin

Redundant nullable return type  

Kotlin

Redundant overriding method  

Kotlin

Redundant property getter  

Kotlin

Redundant property setter  

Kotlin

Redundant qualifier name  

Kotlin

Redundant receiver-based 'let' call  

Kotlin

Redundant semicolon  

Kotlin

Redundant setter parameter type  

Kotlin

Redundant spread operator  

Kotlin

Redundant string template  

Kotlin

Redundant value argument  

Kotlin

Redundant visibility modifier  

Kotlin

Replace empty class body  

Kotlin

Should be replaced with 'equals(..., ignoreCase = true)'  

Kotlin

Simplifiable 'when'  

Kotlin

Unnecessary '@OptIn' annotation  

Kotlin

Unnecessary local variable  

Kotlin

Unnecessary parentheses in function call with lambda  

Kotlin

Unnecessary supertype qualification  

Kotlin

Unnecessary type argument  

Kotlin

Unused import directive  

Kotlin

Unused loop index  

Kotlin

Unused receiver parameter  

Kotlin

Unused symbol  

Kotlin

Last modified: 13 July 2023