Find Compose API design issues

Proprietary

Composable functions that don't follow the Compose API guidelines: lowercase name (UI emitters should be PascalCase), non-Unit return without @ReadOnlyComposable, content slot without a default {}, missing Modifier parameter, and @Composable invocations from non-Composable lambdas.

org.openrewrite.kotlin.compose.FindComposeApiDesignIssues$KtRecipe
mod run . --recipe='org.openrewrite.kotlin.compose.FindComposeApiDesignIssues$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 @Composable functions whose name starts with a lowercase letter
  2. Find @Composable fun … (): X functions returning a non-Unit value
  3. Find @Composable functions with a content lambda parameter not defaulted to {}
  4. Find @Composable functions without a Modifier parameter
  5. Find @Composable calls inside non-@Composable lambda parameters