Find scope-function correctness swaps
ProprietaryThe 12 well-known scope-function correctness rules: with(x) used as a receiver expression vs x.run { }, ?.apply { } whose result is discarded vs ?.also { }, apply { } without mutation vs also { }, also { } with mutation vs apply { }, redundant this. inside apply { }, run without this references.
org. openrewrite. kotlin. idiom. FindScopeFunctionSwaps$KtRecipemod run . --recipe= 'org. openrewrite. kotlin. idiom. FindScopeFunctionSwaps$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.