Back to all rules
What this rule checks
Uses break or continue (a break inside a switch doesn't count)
Configuration
When off, this rule is excluded from pipeline runs. Changes apply immediately.
Code Examples
PASS — this code satisfies the rule
void setup() {
  size(400, 400);
}

void draw() {
  background(255);
  for (int x = 20; x < mouseX; x += 40) {  // the loop condition stops it
    ellipse(x, 200, 30, 30);
  }
}
FAIL — this code triggers the rule
void setup() {
  size(400, 400);
}

void draw() {
  background(255);
  for (int x = 20; x < width; x += 40) {
    if (x > mouseX) {
      break;
    }
    ellipse(x, 200, 30, 30);
  }
}
Overview
Category Out of Scope
Type Custom Zita
Priority 3 (1 = highest, 5 = lowest)
Status Active
PMD Configuration
Java class nl.utwente.processing.pmd.rules.HasBreakContinueRule
Message template break or continue statement used.