Skip to content

Files

Latest commit

 

History

History
21 lines (14 loc) · 448 Bytes

EmptySwitchStatement.md

File metadata and controls

21 lines (14 loc) · 448 Bytes

Pattern: Empty switch statement

Issue: -

Description

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

Here is an example of code that produces a violation:

def someMethod() {
    switch(someVariable) {
        // empty
    }
}

Further Reading