-
Notifications
You must be signed in to change notification settings - Fork 316
Open
Description
Is your feature request related to a problem? Please describe.
The identical-switch-branches rule is useful but a bit too strict.
When writing switch statements on enums from external libraries, it can be useful to handle known current values but also default a default value that matches a branch. This makes it clear what is explicitly mapped and what is a fallback value.
Describe the solution you'd like
I'd like an option to ignore default branches.
Describe alternatives you've considered
I have considered disabling the rule entirely or commenting out specific switch statements. Unfortunately, either option is undesirable as the check is still useful for other identical branch scenarios.
Additional context
Reactions are currently unavailable