Back to all rules
What this rule checks
Uses import statements
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);
  float x = random(width);  // Processing's own random()
  ellipse(x, 200, 30, 30);
}
FAIL — this code triggers the rule
import java.util.Random;

Random rng = new Random();

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

void draw() {
  background(255);
  float x = rng.nextFloat() * width;
  ellipse(x, 200, 30, 30);
}
Overview
Category Out of Scope
Type Custom Zita
Priority 3 (1 = highest, 5 = lowest)
Status Active
PMD Configuration
Java class nl.utwente.processing.pmd.rules.HasImportStatementRule
Message template Import statement found.