Simplify boolean expression
MSALChecks for overly complicated boolean expressions, such as if (b == true), b || true, !false, etc. Needlessly complex boolean logic makes code harder to reason about and increases the chance of introducing errors during future modifications.
org. openrewrite. staticanalysis. SimplifyBooleanExpressionmod run . --recipe= org. openrewrite. staticanalysis. SimplifyBooleanExpressionInstall it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.