Back to all rules
What this rule checks
Uses the this keyword
Configuration
When off, this rule is excluded from pipeline runs. Changes apply immediately.
Code Examples
PASS — this code satisfies the rule
class Ball {
  int x;
  Ball(int startX) { x = startX; }
}
FAIL — this code triggers the rule
class Ball {
  int x;
  Ball(int x) { this.x = x; }
  // 'this' is out of scope
}
Overview
Category Out of Scope
Type Custom Zita
Priority 4 (1 = highest, 5 = lowest)
Status Active
PMD Configuration
Java class nl.utwente.processing.pmd.rules.HasThisKeywordRule
Message template The 'this' keyword is used.