mrmans0n / compose-rules

Lint rules for ktlint/detekt aimed to contribute to a healthier usage of Compose. Actively maintained and evolved fork of the Twitter Compose rules.
https://mrmans0n.github.io/compose-rules
Other
550 stars 21 forks source link

Fix ContentTrailingLambda rule not taking @Composable into account #300

Closed mrmans0n closed 1 month ago

mrmans0n commented 1 month ago

ContentTrailingLambda rule wasn't filtering by @Composable annotation presence, so that might have lead to false positives. In this change, I am making it so treatAsLambda and treatAsComposableLambda are handled different, and the former would also need the type being annotated.