Find mutableMapOf<K,V>().also { it.put(...) } patterns
ProprietarySame shape as mutableListOf().also { it.add(...) } for maps. The builder form (buildMap { put(...) }) makes the entries visible without the side-channel it.put.
org. openrewrite. kotlin. bestpractices. FindMutableMapAlsoPut$KtRecipemod run . --recipe= 'org. openrewrite. kotlin. bestpractices. FindMutableMapAlsoPut$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.