Skip to content

Files

Latest commit

 

History

History
21 lines (14 loc) · 435 Bytes

EmptyForStatement.md

File metadata and controls

21 lines (14 loc) · 435 Bytes

Pattern: Empty for statement

Issue: -

Description

Checks for empty for blocks. Empty for statements are confusing and serve no purpose.

Here is an example of code that produces a violation:

def someMethod() {
    for (int i=0; i < 23; i++) {
        // empty
    }
}

Further Reading