Unnecessary return as last statement in void method

MSAL

Removes return from a void method if it's the last statement. A trailing return in a void method has no effect on control flow and is just noise that distracts from the meaningful logic.

org.openrewrite.staticanalysis.UnnecessaryReturnAsLastStatement
mod run . --recipe=org.openrewrite.staticanalysis.UnnecessaryReturnAsLastStatement

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