Back to all rules
What this rule checks
A user-declared method shares its name with a Processing built-in function
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);
  drawBall(mouseX, mouseY);
}

void drawBall(float x, float y) {  // its own name, not a built-in's
  ellipse(x, y, 30, 30);
}
FAIL — this code triggers the rule
void setup() {
  size(400, 400);
}

void draw() {
  background(255);
  circle(mouseX, mouseY);
}

void circle(float x, float y) {  // shares its name with Processing's circle()
  ellipse(x, y, 30, 30);
}
Overview
Category PDPS
Type Custom Zita
Priority 3 (1 = highest, 5 = lowest)
Status Active
PMD Configuration
Java class nl.utwente.processing.pmd.rules.HasOverloadedBuiltinMethodRule
Message template User method shares a name with a Processing builtin.