Switch statement case missing
Author: Semmle LGTM
import java
from SwitchStmt switch, EnumType enum, EnumConstant missing
where
switch.getExpr().getType() = enum and
missing.getDeclaringType() = enum and
not switch.getAConstCase().getValue() = missing.getAnAccess() and
not exists(switch.getDefaultCase())
select switch
Description
Finds switch statements with a missing enum constant case and no default case