Is your feature request related to a problem? Please describe.
The rule complained about a code like this:
func isOneOf(what int) bool {
switch what{
case 1, 2, 3:
return true
}
return false
}
While it obviously misses a default branch, it's also obviously equivalent to having one.
Describe the solution you'd like
I'd like to suggest to mute the "missing default branch" when the switch statement is followed by an immediate unconditional return. Having the default branch is not an end in itself, it's a means to having more robust code. And if the linter can trivially (or so it seems to my uneducated eye) check that the code is robust without complaining, it should not complain.