Back to all rules
What this rule checks
Defines a function or class method of their own (top-level Processing callbacks like setup()/draw() don'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);
  drawBall();
}

void drawBall() {
  ellipse(mouseX, mouseY, 50, 50);
}
FAIL — this code triggers the rule
void setup() {
  size(400, 400);
}

void draw() {
  background(255);
  ellipse(mouseX, mouseY, 50, 50);  // everything inline in draw()
}
Overview
Category Topic Functions
Level Basic
Type Custom Zita
Priority 3 (1 = highest, 5 = lowest)
Status Active
PMD Configuration
Java class nl.utwente.processing.pmd.rules.HasUserDefinedMethod
Message template No user-defined functions found.