Find lazy { } calls without an explicit LazyThreadSafetyMode

Proprietary

lazy { } defaults to LazyThreadSafetyMode.SYNCHRONIZED — every read passes a synchronized check. For thread-confined state (UI, single-threaded actors), lazy(LazyThreadSafetyMode.NONE) { } avoids the synchronization entirely.

org.openrewrite.kotlin.bestpractices.FindLazyWithoutMode$KtRecipe
mod run . --recipe='org.openrewrite.kotlin.bestpractices.FindLazyWithoutMode$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.