Back to all rules
What this rule checks
Variable names not too long (max 17 chars)
Configuration
When off, this rule is excluded from pipeline runs. Changes apply immediately.
Code Examples
PASS — this code satisfies the rule
int ballSpeed = 3;
float circleSize = 50;
FAIL — this code triggers the rule
int theBallMovementSpeed = 3;
// 21 chars — too long, use ballSpeed instead
Overview
Category Topic Variables
Level Intermediate
Type Built-in PMD
Priority 3 (1 = highest, 5 = lowest)
Status Active
PMD Configuration
PMD reference category/java/codestyle.xml/LongVariable