Cleanup nodes (#5358)

* Remove unused NavTarget.Empty

* Let SpaceEntryPoint.Inputs implement NodeInputs.

* Small cleanup

* Small cleanup

* Method can be private.

* Simplify code

* Rename to follow naming convention

* Rename Node to follow naming convention

* Add Konsist test.

* Remove useless line of code.
This commit is contained in:
Benoit Marty 2025-09-16 14:36:43 +02:00 committed by GitHub
commit fecb8cb0be
13 changed files with 42 additions and 50 deletions

View file

@ -20,6 +20,7 @@ import com.lemonappdev.konsist.api.ext.list.withoutName
import com.lemonappdev.konsist.api.ext.list.withoutNameStartingWith
import com.lemonappdev.konsist.api.verify.assertEmpty
import com.lemonappdev.konsist.api.verify.assertTrue
import io.element.android.libraries.architecture.BaseFlowNode
import io.element.android.libraries.architecture.Presenter
import org.junit.Test
@ -44,6 +45,16 @@ class KonsistClassNameTest {
}
}
@Test
fun `Classes extending 'BaseFlowNode' should have 'FlowNode' suffix`() {
Konsist.scopeFromProject()
.classes()
.withAllParentsOf(BaseFlowNode::class)
.assertTrue {
it.name.endsWith("FlowNode")
}
}
@Test
fun `Classes extending 'PreviewParameterProvider' name MUST end with 'Provider' and MUST contain provided class name`() {
Konsist.scopeFromProduction()