Inspectopedia 2025.3 Help

Style issues

'addAll(map/filter {})' can be replaced with 'mapTo/filterTo'   New in this release

Reports calls to MutableCollection.addAll / += where the argument is a call to Iterable.map/filter.

'associate' can be replaced with 'associateBy' or 'associateWith'  

Reports calls to associate() and associateTo() that can be replaced with associateBy() or associateWith().

'filterIsInstance' call with a class literal argument  

Reports calls of the Kotlin standard library function filterIsInstance with a class literal argument.

'map' call can be replaced with 'forEach'   New in this release

Reports map calls whose results are ignored and can be replaced with forEach.

'map.getOrDefault()' can be replaced with indexing and elvis operator  

Replaces map.getOrDefault(key, defaultValue) function calls with an indexing and elvis operator (map[key] ?: defaultValue).

'rangeTo' or the '..' call should be replaced with '..<'  

Reports calls to rangeTo or the .

'rangeTo' or the '..' call should be replaced with 'until'  

Reports calls to rangeTo or the .

'readLine' can be replaced with 'readln' or 'readlnOrNull'  

Reports calls to readLine() that can be replaced with readln() or readlnOrNull().

Assert boolean could be replaced with assert equality  

Reports calls to assertTrue() and assertFalse() that can be replaced with assert equality functions.

Boolean expression can be simplified  

Reports boolean expression parts that can be reduced to constants.

Call chain on collection could be converted into 'Sequence' to improve performance  

Reports call chain on a Collection that should be converted into Sequence.

Call of 'toString' could be replaced with string template  

Reports toString function calls that can be replaced with a string template.

Multiple operators with different precedence  

Reports binary expressions that consist of different operators without parentheses.

Negated boolean expression can be simplified  

Reports negated boolean expressions that can be simplified.

Non-canonical modifier order  

Reports modifiers that do not follow the order recommended by the style guide.

Object literal can be converted to lambda  

Reports anonymous object literals implementing a Java interface with a single abstract method that can be converted into a call with a lambda expression.

Range can be converted to indices or iteration  

Reports until and rangeTo operators that can be replaced with Collection.indices or iteration over collection inside for loop.

Redundant parentheses  

Reports expressions containing redundant parentheses.

Replace 'contains' call with 'in' operator   New in this release

Replaces contains member calls with an in operator.

Replace 'mapIndexed' with List generator  

Reports a mapIndexed call that can be replaced by List generator.

Replace 'until' with '..<' operator  

Reports until that can be replaced with ..< operator.

Safe cast with 'return' should be replaced with 'if' type check  

Reports safe cast with return that can be replaced with if type check.

Suspicious 'asDynamic' member invocation  

Reports usages of asDynamic function on a receiver of dynamic type.

Trailing comma recommendations  

Reports trailing commas that do not follow the recommended style guide.

Two comparisons should be converted to a range check  

Reports two consecutive comparisons that can be converted to a range check.

Unsafe cast with 'return' should be replaced with the safe one   New in this release

Reports an unsafe cast with return in variable assignments or in value arguments that can be replaced with a safe cast.

Variable declaration could be moved into 'when'  

Reports variable declarations that can be moved inside a when expression.

Last modified: 03 December 2025