Pattern: Unnecessary .?
Issue: -
Reports unnecessary safe call operators (.?
) that can be removed by the user.
Example of incorrect code:
val a: String = ""
val b = someValue?.length
Example of correct code:
val a: String? = null
val b = someValue?.length