slackhq / compose-lints

Lint checks to aid with a healthy adoption of Compose

Home Page:https://slackhq.github.io/compose-lints

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ComposeContentEmitterReturningValues incorrectly reports on compose functions with multiple top-level emitters

acrab opened this issue · comments

Example code:

@Composable
fun Test(modifier: Modifier = Modifier){
    Text(text = "TextOne")
    Text(text = "TextTwo")
}

Expected result: ComposeMultipleContentEmitters lint rule will trigger

Actual result: Both that rule and ComposeContentEmitterReturningValues trigger, leading to a confusing set of warnings!

image

PR welcome!