Boolean expressions should not be compared against boolean literals, as their value can be directly used.

The following code:

if (booleanVariable == true) { /* ... */ }         // Non-Compliant
if (booleanVariable != true) { /* ... */ }         // Non-Compliant

should be refactored into:

if (booleanVariable) { /* ... */ }                 // Compliant
if (!booleanVariable) { /* ... */ }                // Compliant