You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@Test
fun`example1`() {
val code =""" interface DeathStar { fun seekTieFighters(block: () -> Unit) } class ForegroundColorSpan(color: Int) fun List<DeathStar>?.f(colorLink: Int) { this?.map { it.seekTieFighters { ForegroundColorSpan(colorLink) } } }""".trimIndent()
val findings = subject.compileAndLintWithContext(env, code)
assertThat(findings).isEmpty()
}
Expecting empty but was: [CodeSmell(issue=Issue(id='MultilineLambdaItParameter', severity=Style, debt=5min), entity=Entity(name=f, signature=Test.kt${ it.seekTieFighters { ForegroundColorSpan(colorLink) } }, location=Location(source=6:15, text=160:217, file=Test.kt, filePath=FilePath(absolutePath=Test.kt, basePath=null, relativePath=null)), ktElement=LAMBDA_EXPRESSION), message=The implicit it should not be used in a multiline lambda. Consider giving your parameter a readable and descriptive name., metrics=[], references=[], severity=WARNING, id='MultilineLambdaItParameter')]
at io.gitlab.arturbosch.detekt.rules.style.MultilineLambdaItParameterSpec.example1(MultilineLambdaItParameterSpec.kt:241)
in this one there's only one it, could be simplified further though.
Steps to Reproduce
Context
#5397 (comment)
The text was updated successfully, but these errors were encountered: