rspec/rules/S2451/plsql/rule.adoc

35 lines
485 B
Plaintext
Raw Normal View History

2021-04-28 16:49:39 +02:00
Labeled blocks are useful, especially when the code is badly indented, to match the begin and end of each block. This check detects labeled blocks which are missing an ending label.
2021-04-28 16:49:39 +02:00
== Noncompliant Code Example
----
<<myBlockLabel1>>
BEGIN
NULL;
END; -- Noncompliant; this labeled loop has no ending label
/
BEGIN
NULL; -- Compliant; not a labeled block
END;
/
----
2021-04-28 16:49:39 +02:00
== Compliant Solution
----
<<myBlockLabel2>>
BEGIN
NULL;
END myBlockLabel2;
/
BEGIN
NULL;
END;
/
----