Skip to content

Files

Latest commit

 

History

History
28 lines (16 loc) · 456 Bytes

UnnecessarySafeCall.md

File metadata and controls

28 lines (16 loc) · 456 Bytes

Pattern: Unnecessary .?

Issue: -

Description

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

Further Reading