Find SharedPreferences.Editor.commit() calls

Proprietary

commit() writes to disk on the calling thread (often the main thread, where it can drop a frame). apply() writes asynchronously and atomically, returning immediately — use it unless you specifically need the boolean result on the spot.

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