Find stream.collect(Collectors.toList()) calls
ProprietaryThe collect(Collectors.toList()) terminal materializes a Stream into a List. In Kotlin source, the natural shape is iterable.toList() (eager) or sequence.toList() (lazy) — both avoid the Collector machinery and read at a glance.
org. openrewrite. kotlin. interop. FindStreamCollectorsToList$KtRecipemod run . --recipe= 'org. openrewrite. kotlin. interop. FindStreamCollectorsToList$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.