twitter / compose-rules

Static checks to aid with a healthy adoption of Compose
https://twitter.github.io/compose-rules
Other
1.36k stars 93 forks source link

Add UnstableCollections rule #99

Closed mrmans0n closed 2 years ago

mrmans0n commented 2 years ago

The Compose compiler cannot infer stability for kotlin collection interfaces (List/Set/Map), so any composable with one of those (which is pretty likely) as a parameter will be deemed unstable by the compiler. This rule detects those cases and prompt the user to use the Kotlinx Immutable Collections alternative instead, or an @Immutable wrapper.

Fixes #44. (the remaining open inquiry)