Find fun foo(): T { return x } block bodies
ProprietaryA function whose entire body is a single return expr is the canonical shape for Kotlin's single-expression-body syntax (fun foo(): T = expr). The expression form makes type inference more useful and removes one level of brace nesting.
org. openrewrite. kotlin. bestpractices. FindSingleExpressionBodyCandidate$KtRecipemod run . --recipe= 'org. openrewrite. kotlin. bestpractices. FindSingleExpressionBodyCandidate$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.