Find Compose Modifier smells

Proprietary

Modifier-chain shapes that allocate per recomposition (Modifier.padding(...) inline), branch with structurally distinct chains (if (x) Modifier.foo() else Modifier), or stack fillMax/padding in a layout-changing order. Each match needs the author's intent to fix correctly.

org.openrewrite.kotlin.compose.FindComposeModifierIssues$KtRecipe
mod run . --recipe='org.openrewrite.kotlin.compose.FindComposeModifierIssues$KtRecipe'

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.

Recipe list

It runs these recipes, in this order.

  1. Find Modifier.xxx() allocations inside a @Composable body
  2. Find if (x) Modifier.foo() else Modifier patterns
  3. Find Modifier.fillMaxXxx().padding(...) chains
  4. Find Canvas { … } blocks inside a @Composable
  5. Find n.dp allocations inside a @Composable body