rspec/rules/S1125/plsql/rule.adoc

51 lines
911 B
Plaintext
Raw Normal View History

include::../description.adoc[]
== Noncompliant Code Example
2022-02-04 17:28:24 +01:00
[source,sql]
----
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
2022-02-04 17:28:24 +01:00
[source,sql]
----
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[]
'''
== 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[]