Find Compose effect handler issues
ProprietaryEffect 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$KtRecipemod 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.
- Find
LaunchedEffect(Unit) { … }blocks - Find
LaunchedEffect(true) { … }blocks - Find
DisposableEffect { … }blocks missing anonDispose { } - Find logging calls in
@Composablebodies - Find
java.io.File(...)allocations inside a@Composablebody - Find
rememberCoroutineScope()calls inside a lambda - Find
for (...) { LaunchedEffect(...) { … } }patterns