Find Thread { }.start() calls inside Activity / Fragment
ProprietaryHand-rolled Thread { … }.start() inside a UI component leaks across configuration changes (the thread outlives the activity) and has no story for cancellation. Migrate to lifecycleScope.launch(Dispatchers.IO) { … } or viewModelScope.launch { … } — both cancel when the lifecycle ends.
org. openrewrite. kotlin. android. FindManualThreadingInActivity$KtRecipemod run . --recipe= 'org. openrewrite. kotlin. android. FindManualThreadingInActivity$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.