rspec/rules/S1145/plsql/rule.adoc

37 lines
825 B
Plaintext

``++IF++`` statements with conditions that are always false have the effect of making blocks of code non-functional. This can be useful during debugging, but should not be checked in. ``++IF++`` statements with conditions that are always true are completely redundant, and make the code less readable. In either case, unconditional ``++IF++`` statements should be removed.
== Noncompliant Code Example
----
IF TRUE THEN
do_something;
END IF;
IF FALSE THEN
do_something_else;
END IF;
----
== Compliant Solution
----
do_something;
----
include::../see.adoc[]
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
include::../message.adoc[]
'''
== Comments And Links
(visible only on this page)
include::../comments-and-links.adoc[]
endif::env-github,rspecator-view[]