Labeled blocks are useful, especially when the code is badly indented, to help maintainers match the beginning and ending of each block. When blocks are nested, labeling them can improve the code's readability. This rule detects nested block which do not have a start label.


== Noncompliant Code Example

----
BEGIN -- Compliant, this is not a nested block
  NULL;
END;
/

BEGIN
  BEGIN -- Noncompliant; this nested block has no label
    NULL;
  END;
END;
/

BEGIN
  BEGIN -- Noncompliant; this nested block has only an end label
    NULL;
  END myBlockLabel1;

  <<myBlockLabel2>> -- Compliant
  BEGIN
    NULL;
  END;
END;
/
----


== Compliant Solution

----
BEGIN 
  NULL;
END;
/

BEGIN
  BEGIN myBlockLabel0
    NULL;
  END myBlockLabel0;
END;
/

BEGIN
  BEGIN myBlockLabel1
    NULL;
  END myBlockLabel1;

  <<myBlockLabel2>>
  BEGIN
    NULL;
  END;
END;
/
----


ifdef::env-github,rspecator-view[]
'''
== Comments And Links
(visible only on this page)

include::comments-and-links.adoc[]
endif::env-github,rspecator-view[]
