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
525 stars 19 forks source link

ModifierWithoutDefault triggers on open fun composable function #250

Closed ikarenkov closed 2 months ago

ikarenkov commented 2 months ago

The rule ModifierWithoutDefault triggers in abstract class on open composable fun with Modifier parameter. But currently it's impossible to add default value due to compose compiler limitations:

Overridable Composable functions with default values are not currently supported
mrmans0n commented 2 months ago

Yep, currently it checks abstract funs, but not open funs inside abstract classes. Will probably need to add an extra check for this.