Table of Contents

RDC01016: Line label not used

Severity: Information  ·  Family: RDC (Rubberduck Core analyzers)  ·  Raised by: LineLabelNotUsedAnalyzer

No GoTo, GoSub, Resume or On Error GoTo of a procedure names one of its line labels.

A label belongs to its procedure, and only a jump of the procedure can reach it (RD-VBAL §5.4.1.1 Statement Labels). A label nothing jumps to is often left over from code that changed.

A line number is not reported: Erl reads the number of the line an error was raised on, so a line number may be there for that.

The finding is the label.

How it is raised

Situation Example Resolution
A line label that no jump names. Sub Work()
Retry:
Debug.Print 1
End Sub
Remove the label.

See also


ACCUEIL • HOME | ℹ️ BIENVENUE • WELCOME | 🧩 BÂTISSONS • BUILD | RD-VBAL | SDK | 🌐 rubberduckvba.ca