Skip to content

Latest commit

 

History

History
21 lines (14 loc) · 418 Bytes

EmptyIfStatement.md

File metadata and controls

21 lines (14 loc) · 418 Bytes

Pattern: Empty if statement

Issue: -

Description

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

Here is an example of code that produces a violation:

def someMethod() {
    if (x==23) {
        // empty
    }
}

Further Reading