Simplify constant if branch execution
MSALChecks for if conditions that are always true or false and simplifies them. Branches that can never execute are dead code that misleads readers and may mask logic errors introduced during refactoring.
org. openrewrite. staticanalysis. SimplifyConstantIfBranchExecutionmod run . --recipe= org. openrewrite. staticanalysis. SimplifyConstantIfBranchExecutionInstall it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.