G-4270: Avoid comparing boolean values to boolean literals.
Minor
Maintainability, Testability
Reason
It is more readable to simply use the boolean value as a condition itself, rather than use a comparison condition comparing the boolean value to the literals true
or false
.
Example (bad)
1 2 3 4 5 6 7 8 9 10 |
|
Example (good)
1 2 3 4 5 6 7 8 9 10 |
|