Back to all rules
What this rule checks
Reads an array element, e.g. ellipse(xs[i], 50, 5, 5) or balls[i].show() (composed post-Zita from Marker-only rule 8 / ArrayUserUseRule)
Configuration
When off, this rule is excluded from pipeline runs. Changes apply immediately.
Code Examples
PASS — this code satisfies the rule
float[] trail = new float[10];

void setup() {
  size(400, 400);
}

void draw() {
  background(255);
  trail[frameCount % 10] = mouseX;
  ellipse(trail[0], 200, 20, 20);
}
FAIL — this code triggers the rule
float[] trail = new float[10];

void setup() {
  size(400, 400);
}

void draw() {
  background(255);
  trail[frameCount % 10] = mouseX;  // stored, but never read back
  ellipse(mouseX, 200, 20, 20);
}
Overview
Category Topic Arrays
Level Basic
Type Custom Zita
Priority 1 (1 = highest, 5 = lowest)
Status Active
PMD Configuration
Message template No array element is read.