Browse Source

Fix API break in Konsist 0.15.1

pull/2948/head
Benoit Marty 4 months ago committed by Benoit Marty
parent
commit
b994a1ea91
  1. 8
      tests/konsist/src/test/kotlin/io/element/android/tests/konsist/KonsistArchitectureTest.kt

8
tests/konsist/src/test/kotlin/io/element/android/tests/konsist/KonsistArchitectureTest.kt

@ -87,7 +87,13 @@ class KonsistArchitectureTest { @@ -87,7 +87,13 @@ class KonsistArchitectureTest {
.withAnnotationOf(Composable::class)
.assertTrue(additionalMessage = "Consider adding the @Immutable or @Stable annotation to the sealed interface") {
it.parameters.all { param ->
param.type.fullyQualifiedName !in forbiddenInterfacesForComposableParameter
val type = param.type.text
return@all if (type.startsWith("@") || type.startsWith("(") || type.startsWith("suspend")) {
true
} else {
val fullyQualifiedName = param.type.declaration.packagee?.fullyQualifiedName + "." + type
fullyQualifiedName !in forbiddenInterfacesForComposableParameter
}
}
}
}

Loading…
Cancel
Save