Unnecessary bit operations should not be performed
MSALRemove bitwise operations that always yield their other operand: x & -1, x | 0 and x ^ 0 are all just x. Compound assignments such as x |= 0 are replaced by x where their value is used, and removed where they stand alone as a statement.
org. openrewrite. staticanalysis. RemoveUnnecessaryBitwiseOperationmod run . --recipe= org. openrewrite. staticanalysis. RemoveUnnecessaryBitwiseOperationInstall it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.