Unused enum members
What an unused-enum-member finding of fallow dead-code means, why it matters and how to fix it.
What it reports
Enum member is never referenced.
Dead code explains how fallow finds it.
Why it matters
Readers treat each enum member as a state that can occur, so switch statements, mappings and tests keep a branch for a value that no code uses.
Example
Status.Legacy remains in an exported enum, but no code reads that member.
Fix
Remove the member after checking serialized/API compatibility, or suppress it with a reason when external data still uses it.
Facts
| Fact | Value |
|---|---|
| Issue type | unused-enum-member |
| Rule id in SARIF output | fallow/unused-enum-member |
| Command | fallow dead-code |
| Default severity | error |
Config key in rules | unused-enum-members |
| Filter option | --unused-enum-members |
| Suppression comment | // fallow-ignore-next-line unused-enum-member |
Fixable with fallow fix | Yes |
| Opt-in | No |