Simplify redundant self-comparison ($var == $var)
to achieve clearer code logic and avoid unnecessary repetition.
Apply with the Grit CLI
grit apply unnecessary_equality_comparison
$x == #x
BEFORE
class Bar { void main() { boolean myBoolean; if(myBoolean == myBoolean){ continue; } } }
AFTER
class Bar { void main() { boolean myBoolean; continue; } }
$x == #y
JAVA
class Bar { void main() { boolean myBoolean; boolean myBoolean2; if(myBoolean == myBoolea2){ continue; } } }