Back to all rules
What this rule checks
Function names not too short (min 3 chars)
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);
  db();
}

void db() {  // name too short to say what it does
  ellipse(mouseX, mouseY, 50, 50);
}
Overview
Category Topic Functions
Level Intermediate
Type Built-in PMD
Priority 3 (1 = highest, 5 = lowest)
Status Active
PMD Configuration
PMD reference category/java/codestyle.xml/ShortMethodName