Find Compose effect handler issues

Proprietary

Effect handlers misused: LaunchedEffect(Unit)/LaunchedEffect(true) placeholder keys, DisposableEffect lambdas missing onDispose { }, rememberCoroutineScope() mis-placed inside a lambda, LaunchedEffect inside loops, and side-effecting calls (logging, File) inside the composable body rather than an effect block.

org.openrewrite.kotlin.compose.FindComposeEffectIssues$KtRecipe
mod run . --recipe='org.openrewrite.kotlin.compose.FindComposeEffectIssues$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 LaunchedEffect(Unit) { … } blocks
  2. Find LaunchedEffect(true) { … } blocks
  3. Find DisposableEffect { … } blocks missing an onDispose { }
  4. Find logging calls in @Composable bodies
  5. Find java.io.File(...) allocations inside a @Composable body
  6. Find rememberCoroutineScope() calls inside a lambda
  7. Find for (...) { LaunchedEffect(...) { … } } patterns