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

[Bug] UnstableCollectionsCheck is not taking into the account stability configuration file #248

Closed ikarenkov closed 2 months ago

ikarenkov commented 2 months ago

Beginning with Compose Compiler 1.5.5 you can consider kotlin.collections.* to be stable by default. Documentation.

In rule check is made by calling isTypeUnstableCollection, which is not correct, if you use stability configuration file. Code.

It would be nice to find the way to check stability by another approach.

mrmans0n commented 2 months ago

If you add the collections to the stability configuration file, just disable the rule in the ktlint or detekt configuration. It's no big deal 😄

Leaving the rule running in that case (and having it parse the stability config file all the time to see if it should be enabled or not) would be a bit wasteful anyway.