Pattern: Use of literal bool comparison
Issue: -
DON'T use true
or false
in equality operations.
This lint applies only if the expression is of a non-nullable bool
type.
Example of incorrect code:
if (someBool == true) {
}
while (someBool == false) {
}
Example of correct code:
if (someBool) {
}
while (!someBool) {
}