rspec/rules/S2451/plsql/rule.adoc
Fred Tingaud 16f6c0aecf
Inline adoc when include has no additional value (#1940)
Inline adoc files when they are included exactly once.

Also fix language tags because this inlining gives us better information
on what language the code is written in.
2023-05-25 14:18:12 +02:00

51 lines
737 B
Plaintext

== Why is this an issue?
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.
=== Noncompliant code example
[source,sql]
----
<<myBlockLabel1>>
BEGIN
NULL;
END; -- Noncompliant; this labeled loop has no ending label
/
BEGIN
NULL; -- Compliant; not a labeled block
END;
/
----
=== Compliant solution
[source,sql]
----
<<myBlockLabel2>>
BEGIN
NULL;
END myBlockLabel2;
/
BEGIN
NULL;
END;
/
----
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
=== Message
Add the missing "xxx" label to this statement.
endif::env-github,rspecator-view[]