Prefer direct comparison of numbers
MSALReplace a - b == 0 with a == b, a - b != 0 with a != b, a - b < 0 with a < b, and similar transformations for all comparison operators to improve readability and avoid overflow issues.
org. openrewrite. staticanalysis. PreferEqualityComparisonOverDifferenceCheckmod run . --recipe= org. openrewrite. staticanalysis. PreferEqualityComparisonOverDifferenceCheckInstall it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.