Simplify boolean return
MSALSimplifies if statements that only return true or false to a single return. For example, if (a) { return true; } return false; simplifies to return a;. Wrapping a boolean expression in an if-then-else just to return true or false adds unnecessary control flow that obscures the straightforward intent of the expression.
org. openrewrite. staticanalysis. SimplifyBooleanReturnmod run . --recipe= org. openrewrite. staticanalysis. SimplifyBooleanReturnInstall it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.