
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.
51 lines
737 B
Plaintext
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[]
|