rspec/rules/S1125/plsql/rule.adoc

42 lines
791 B
Plaintext
Raw Normal View History

include::../description.adoc[]
== Noncompliant Code Example
----
SET SERVEROUTPUT ON
DECLARE
foo BOOLEAN := TRUE;
BEGIN
IF foo = FALSE THEN -- Noncompliant
DBMS_OUTPUT.PUT_LINE('foo = false!');
ELSIF foo = TRUE THEN -- Noncompliant
DBMS_OUTPUT.PUT_LINE('foo = true!');
END IF;
END;
/
----
== Compliant Solution
----
DECLARE
foo BOOLEAN := TRUE;
BEGIN
IF NOT foo THEN -- Compliant
DBMS_OUTPUT.PUT_LINE('foo = false!');
ELSIF foo THEN -- Compliant
DBMS_OUTPUT.PUT_LINE('foo = true!');
END IF;
END;
/
----
ifdef::env-github,rspecator-view[]
'''
== Comments And Links
(visible only on this page)
include::../comments-and-links.adoc[]
endif::env-github,rspecator-view[]