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 first testcase in AnnotationRuleTest modified to get a violation reported:
@Test
fun `lint single annotation may be placed on line before annotated construct`() {
assertThat(
AnnotationRule().lint(
"""
@Suppress("UnsafeCast") // False positive, see issue #1137
class A {
@JvmField
var x: String
}
""".trimIndent()
)
).isEmpty()
}
Following file has three annotations with a comment next to it:
https://github.com/arturbosch/detekt/blob/8ae133c2876a94814973ba397c6809cd4a5e514b/detekt-test/src/main/kotlin/io/gitlab/arturbosch/detekt/test/ThresholdedCodeSmellAssert.kt#L8-L9
Unfortunately KtLint does not respect this.
The first testcase in AnnotationRuleTest modified to get a violation reported:
The check which fails for comments:
ktlint/ktlint-ruleset-standard/src/main/kotlin/com/pinterest/ktlint/ruleset/standard/AnnotationRule.kt
Lines 50 to 52 in a726c87
The text was updated successfully, but these errors were encountered: