`if` statements with conditions that are always false have the effect of making blocks of code non-functional. `if` statements with conditions that are always true are completely redundant, and make the code less readable.

There are three possible causes for the presence of such code:

- An if statement was changed during debugging and that debug code has been committed.
- Some value was left unset.
- Some logic is not doing what the programmer thought it did.

In any of these cases, unconditional `if` statements should be removed.

## Noncompliant Code Example

    if (true) {  // Noncompliant
      doSomething();
    }
    ...
    if (false) {  // Noncompliant
      doSomethingElse();
    }

    if (!options || options === true) { doThirdThing(); }  // Noncompliant; always true

## Compliant Solution

    doSomething();

    doThirdThing();

## See

- MITRE, CWE-489 - Leftover Debug Code
- MITRE, CWE-570 - Expression is Always False
- MITRE, CWE-571 - Expression is Always True
- MISRA C:2004, 13.7
- MISRA C:2012, 14.3