Correct comparison operator `$x = false`

Java pattern

Assignment inside a condition like this $x = false is usually accidental, this is likely meant to be a comparison $x == false.


Apply with the Grit CLI
grit apply correct_false_comparison_operator

$x = true

BEFORE
class Bar {
    void main() {
        boolean myBoolean;
        if (myBoolean = false) {
            continue;
        }
    }
}
AFTER
class Bar {
    void main() {
        boolean myBoolean;
        if (myBoolean == false) {
            continue;
        }
    }
}