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
543 stars 20 forks source link

Fix false positives with vm-injection rule when in androidx.navigation DSL #213

Closed mrmans0n closed 5 months ago

mrmans0n commented 5 months ago

Filters out the rule violation candidates if they are used inside of a androidx.navigation DSL (NavHost/composable), as it'd be legit using them there. It also removes the autofix capability when the VM factories have arguments, as it's just not practical to check where all the params would come from (and if they'd be available in the composable params).

Fixes #212