Use enumEntries<T>() instead of enumValues<T>()
ProprietaryKotlin 1.9 introduced enumEntries<T>() returning a stable EnumEntries<T> view. Prefer it over enumValues<T>(), which allocates a fresh array on each call.
org. openrewrite. kotlin. migrate. UseEnumEntries$KtRecipemod run . --recipe= 'org. openrewrite. kotlin. migrate. UseEnumEntries$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.