== Why is this an issue? Labeled loops are useful, especially when the code is badly indented, to match the begin and end of each loop. This rule verifies that loop start and end labels match, when both are specified. === Noncompliant code example [source,sql] ---- BEGIN LOOP EXIT; END LOOP; -- Compliant, this loop has no label at all <> LOOP EXIT; END LOOP; -- Compliant, this loop only has a start label LOOP EXIT; END LOOP myLoopLabel2; -- Compliant, this loop only has an end label <> LOOP EXIT; END LOOP myLoopLabel5; -- Noncompliant, label mismatch <> <> LOOP EXIT; END LOOP myLoopLabel7; -- Noncompliant, several start labels mismatch END; / ---- === Compliant solution [source,sql] ---- BEGIN LOOP EXIT; END LOOP; <> LOOP EXIT; END LOOP; LOOP EXIT; END LOOP myLoopLabel2; <> LOOP EXIT; END LOOP myLoopLabel4; <> LOOP EXIT; END LOOP myLoopLabel7; END; / ---- ifdef::env-github,rspecator-view[] ''' == Implementation Specification (visible only on this page) === Message Change this label to "xxx". endif::env-github,rspecator-view[]