Back to all rules
What this rule checks
Function parameter count within limits
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() {
  drawButton(150, 180, 100, 40);
}

void drawButton(float x, float y, float w, float h) {
  rect(x, y, w, h);
}
FAIL — this code triggers the rule
void setup() {
  size(400, 400);
}

void draw() {
  drawButton(150, 180, 100, 40, 255, 0, 0, 255, 2, 8);
}

void drawButton(float x, float y, float w, float h, int r,
    int g, int b, int a, float weight, float radius) {  // 10 parameters
  fill(r, g, b, a);
  strokeWeight(weight);
  rect(x, y, w, h, radius);
}
Overview
Category Topic Functions
Level Advanced
Type Built-in PMD
Priority 3 (1 = highest, 5 = lowest)
Status Active
PMD Configuration
PMD reference category/java/design.xml/ExcessiveParameterList