Inspectopedia Help

'for' loop with missing components

Reports for loops that lack initialization, condition, or update clauses. Some coding styles prohibit such loops.

Example:

for (int i = 0;;i++) { // body }

Use the Ignore collection iterations option to ignore loops which use an iterator. This is a standard way to iterate over a collection in which the for loop does not have an update clause.

Inspection options

Option

Type

Default

Ignore collection iterations

Checkbox

false

Inspection Details

Available in:

IntelliJ IDEA 2023.3, Qodana for JVM 2023.3

Plugin:

Java, 233.SNAPSHOT

Last modified: 13 July 2023