Merge pull request #5503 from element-hq/feature/bma/immutableCleanup
Do some cleanup on our immutable annotation usage
This commit is contained in:
commit
3fb110d991
73 changed files with 178 additions and 107 deletions
|
|
@ -7,8 +7,12 @@
|
|||
|
||||
package io.element.android.tests.konsist
|
||||
|
||||
import androidx.compose.runtime.Immutable
|
||||
import com.lemonappdev.konsist.api.Konsist
|
||||
import com.lemonappdev.konsist.api.ext.list.withAnnotationOf
|
||||
import com.lemonappdev.konsist.api.ext.list.withNameEndingWith
|
||||
import com.lemonappdev.konsist.api.ext.list.withoutName
|
||||
import com.lemonappdev.konsist.api.verify.assertEmpty
|
||||
import com.lemonappdev.konsist.api.verify.assertFalse
|
||||
import org.junit.Test
|
||||
|
||||
|
|
@ -60,4 +64,14 @@ class KonsistImmutableTest {
|
|||
it.text.contains(".toPersistentMap()")
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `Immutable annotation is not used on sealed interface for Presenter Events`() {
|
||||
Konsist
|
||||
.scopeFromProduction()
|
||||
.interfaces()
|
||||
.withNameEndingWith("Events")
|
||||
.withAnnotationOf(Immutable::class)
|
||||
.assertEmpty()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue