Simplify boolean expressions using De Morgan's laws

MSAL

Applies De Morgan's laws to simplify boolean expressions with negation. Transforms !(a && b) to !a || !b and !(a || b) to !a && !b. Distributing negations inward eliminates the outer ! and makes each individual condition's polarity immediately visible, which aids comprehension.

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

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