Labeled blocks are useful, especially when the code is badly indented, to match the begin and end of each block. This rule verifies that block start and end labels match, when both are specified.


== Noncompliant Code Example

----
BEGIN
  NULL;
END; -- Compliant, no labels at all
/

<<myBlockLabel1>>
BEGIN
  NULL;
END; -- Compliant, only starting label
/

BEGIN
  NULL;
END myBlockLabel2; -- Compliant, only ending label
/

<<myBlockLabel3>>
BEGIN
  NULL;
END myBlockLabel4; -- Noncompliant, labels mismatch
/

<<myBlockLabel6>>
<<myBlockLabel6>>
BEGIN
  NULL;
END myBlockLabel6; -- Noncompliant, several starting labels
/
----


== Compliant Solution

----
BEGIN
  NULL;
END;
/

<<myBlockLabel1>>
BEGIN
  NULL;
END;
/

BEGIN
  NULL;
END myBlockLabel2;
/

<<myBlockLabel3>>
BEGIN
  NULL;
END myBlockLabel3;
/

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

