Find stream.collect(Collectors.toList()) calls

Proprietary

The 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$KtRecipe
mod 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.