15 lines
259 B
Plaintext
15 lines
259 B
Plaintext
![]() |
== Noncompliant Code Example
|
||
|
|
||
|
----
|
||
|
a = false;
|
||
|
if (a) { // Noncompliant
|
||
|
doSomething(); // never executed
|
||
|
}
|
||
|
|
||
|
if (!a || b) { // Noncompliant; "!a" is always "true", "b" is never evaluated
|
||
|
doSomething();
|
||
|
} else {
|
||
|
doSomethingElse(); // never executed
|
||
|
}
|
||
|
----
|