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
563 stars 22 forks source link

Add configurable exceptions for ViewModelForwarding rule #165

Closed mrmans0n closed 10 months ago

mrmans0n commented 10 months ago

There might be valid patterns where you want to forward a VM-like class. Usually this could be worked around by using an optional param with viewModel() as a default value and not passing the VM from stateful-parent to stateful-child directly. However, this only works if there is a way to acquire the VMs via a factory, which might not be the case (cough cough Compose multiplatform).

We should allow the allowlisting of Composables that match some given regexes.