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

Add opt-in rule for disallowing Material2 APIs #220

Closed mrmans0n closed 4 months ago

mrmans0n commented 4 months ago

Add a new rule (opt-in) to detect Material 2 usages. This has bit me in the ass at work, so I have a vested interest it goes in 🤣

It will detect usages of the material 2 apis in imports and as fqns in the code. It also has support for an allowlist of apis, based on their package hierarchy.

eygraber commented 4 months ago

Can ignoring androidx.compose.material.icons be built into the rule? I don't think the icons are material 2 specific.