Back to all rules
What this rule checks
Declares at least one global (main-tab) variable
Configuration
When off, this rule is excluded from pipeline runs. Changes apply immediately.
Code Examples
PASS — this code satisfies the rule
int x = 200;
void draw() {
  ellipse(x, 200, 50, 50);
}
FAIL — this code triggers the rule
void draw() {
  ellipse(200, 200, 50, 50);
  // no variables declared
}
Overview
Category Topic Variables
Level Basic
Type Custom Zita
Priority 3 (1 = highest, 5 = lowest)
Status Active
PMD Configuration
Java class nl.utwente.processing.pmd.rules.GlobalVarDeclRule
Message template File must declare at least one variable.