Conditional statements using a condition which cannot be anything but false have the effect of making blocks of code non-functional. If the condition cannot evaluate to anything but true, the conditional statement is completely redundant, and makes the code less readable.

It is quite likely that the code does not match the programmer's intent.

Either the condition should be removed or it should be updated so that it does not always evaluate to true or false.

Noncompliant Code Example

var foo = 42;
// ...
if (foo) { // Noncompliant, always true
}
if (foo) {
  if (!foo) { // Noncompliant, always false
    // ...
  }
}

See