If a label is declared but not used in the program, it can be considered as dead code and should therefore be removed.
This will improve maintainability as developers will not wonder what this label is used for.
Noncompliant code example
whileLoopLabel: while x > 0 { // Noncompliant
x -= 1
}
Compliant solution
while x > 0 {
x -= 1
}