Back to all rules
What this rule checks
Has a comment, anywhere in the sketch, matching a configurable pattern (default: any URL)
Configuration
When off, this rule is excluded from pipeline runs. Changes apply immediately.
Regex matched against comments. An override is case-sensitive — prefix with (?i) for case-insensitive matching. Leave blank to use the default: any http(s):// URL, case-insensitive. Use nga\.gov\.au to require a specific domain. Changes auto-save.
Code Examples
PASS — this code satisfies the rule
// Bouncing Ball, adapted from https://processing.org/examples/bounce.html
float ballX = 0;

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

void draw() {
  background(255);
  ballX = ballX + 2;
  ellipse(ballX, 200, 30, 30);
}
FAIL — this code triggers the rule
// Bouncing Ball
float ballX = 0;

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

void draw() {
  background(255);
  ballX = ballX + 2;
  ellipse(ballX, 200, 30, 30);
}
Overview
Category Standalone
Type Custom Zita
Priority 3 (1 = highest, 5 = lowest)
Status Hidden Rule runs but results are hidden from student feedback
PMD Configuration
Java class nl.utwente.processing.pmd.rules.HasHeaderCommentRule
Message template File should contain a header comment with a link