Find recursive functions not marked tailrec

Proprietary

A self-recursive function that doesn't carry the tailrec modifier won't get the Kotlin compiler's stack-elimination transform. Each match is a candidate to either annotate (if the recursive call is in tail position) or rewrite to an iterative form.

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