Remove explicit return statements

Proprietary

Removes explicit return statements in tail position in Scala code. In Scala, the last expression in a method is automatically the return value, so explicit return is not idiomatic. Early returns and returns inside lambdas are left unchanged.

org.openrewrite.scala.cleanup.RemoveExplicitReturn
mod run . --recipe=org.openrewrite.scala.cleanup.RemoveExplicitReturn

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.