Branches with identical implementations should be merged
MSALWhen two consecutive branches of an if/else if chain execute the same code, they can be merged by combining their conditions with ||. This removes duplication and makes the intent clearer.
org. openrewrite. staticanalysis. MergeIdenticalBranchesmod run . --recipe= org. openrewrite. staticanalysis. MergeIdenticalBranchesInstall it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.