ForLoopVariableCount
What this rule checks
For-loop declares only one control variable
Configuration
When off, this rule is excluded from pipeline runs. Changes apply immediately.
Code Examples
Overview
| Category | Topic Iteration |
| Level | Intermediate |
| Type | Built-in PMD |
| Priority | 3 (1 = highest, 5 = lowest) |
| Status | Active |
PMD Configuration
| PMD reference | category/java/bestpractices.xml/ForLoopVariableCount |
| Properties |
maximumVariables = 1 |