26 lines
530 B
Plaintext
26 lines
530 B
Plaintext
include::../description.adoc[]
|
|
|
|
== Noncompliant Code Example
|
|
|
|
----
|
|
a = False
|
|
if a: # Noncompliant
|
|
doSomething() # never executed
|
|
|
|
n = None
|
|
|
|
if not n: # Noncompliant; n is None, which is always equivalent to "False" in a condition, "doSomethingElse()" is never evaluated
|
|
doSomething()
|
|
else:
|
|
doSomethingElse() # never executed
|
|
----
|
|
|
|
include::../see.adoc[]
|
|
|
|
ifdef::env-github,rspecator-view[]
|
|
== Comments And Links
|
|
(visible only on this page)
|
|
|
|
include::../comments-and-links.adoc[]
|
|
endif::env-github,rspecator-view[]
|