Expected Behavior
UnnecessaryLet takes in account if the we use the return value of let or not.
Observed Behavior
UnnecessaryLet flags some of those.
Steps to Reproduce
val a = listOf<List<String>?>(listOf(""))
.map { list -> list?.let { it + it } }
Context
This is the same problem that #2938 but with UnnecessaryLet instead of UnnecessaryApply
Your Environment
- Version of detekt used: 1.11.1
Expected Behavior
UnnecessaryLettakes in account if the we use the return value ofletor not.Observed Behavior
UnnecessaryLetflags some of those.Steps to Reproduce
Context
This is the same problem that #2938 but with
UnnecessaryLetinstead ofUnnecessaryApplyYour Environment