NAME

Module::Checkstyle::Check::Label - Checks label declarations and usage

CONFIGURATION DIRECTIVES

Label name

Checks that a label is named correctly. Use matches-name to specify a regular expression that must match.

matches-name = qr/^(?:[A-Z]+_)*[A-Z]+$/

Label position

Checks that a label is positioned correctly. Use position to specify either 'alone' or 'same'.

  # position = alone
  LABEL:
    while (1) {
    }

  # position = same
  LABEL: while(1) {
  }

position = alone | same

Require label for break statements

Checks that last, next and redo are called with a label. Set require-for-break to enable.

require-for-break = true

SEE ALSO

Writing configuration files. "Format" in Module::Checkstyle::Config

Module::Checkstyle