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
The original test case from #5429's OP wasn't implemented in #5453:
@Test
fun `don't raise multiline raw strings if all have the correct indentation - tabs`() {
val TAB = "\t"
val code = """
val a =
${TAB}$TQ
${TAB}${TAB}Hello world!
${TAB}${TAB}How are you?
${TAB}$TQ.trimIndent()
""".trimIndent()
subject.compileAndLint(code)
assertThat(subject.findings)
.isEmpty()
}
if all the indentation levels are tabs, it miscalculates the expected by 3:
LintMessageDetailsSplitter.kt:65:11: The indentation should be 13 but it is 10. [MultilineRawStringIndentation]
LintMessageDetailsSplitter.kt:70:10: The indentation should be 12 but it is 9. [MultilineRawStringIndentation]
SuppressionGenerator.kt:16:7: The indentation should be 9 but it is 6. [MultilineRawStringIndentation]
When the code is indented by tabs, it's expected to have the indentation inside the raw string as tab too, because this rule is enforcing code indentation inside a raw string, therefore it's not part of the output.
The text was updated successfully, but these errors were encountered:
@Test
fun`don't raise multiline raw strings if all have the correct indentation - tabs`() {
val code =""" val a = ${TAB}$TQ${TAB}${TAB}Hello world!${TAB}${TAB}How are you?${TAB}$TQ.trimIndent()""".trimIndent()
val subject =MultilineRawStringIndentation(TestConfig(mapOf("indentSize" to 1)))
subject.compileAndLint(code)
assertThat(subject.findings)
.isEmpty()
}
Same as #5429
The original test case from #5429's OP wasn't implemented in #5453:
if all the indentation levels are tabs, it miscalculates the expected by 3:
When the code is indented by tabs, it's expected to have the indentation inside the raw string as tab too, because this rule is enforcing code indentation inside a raw string, therefore it's not part of the output.
The text was updated successfully, but these errors were encountered: