Open
Description
Your feature request related to a problem? Please describe.
The emptycase
linter finds case statements with no body.
As per their README:
It is common knowledge for gopher that there is no fall through in the switch-case statement of the Go language. However, people who are used to C or Java may inadvertently write code like the following.
func f() {
v := 1
switch v {
case 1:
case 2:
fmt.Println("execute")
}
}
Of course, Println() donesn't be executed. However, it takes a while to realize this when you write it. This Analyzer detects empty cases, making it faster to notice problems.
https://github.com/gostaticanalysis/emptycase
Describe the solution you'd like.
—
Describe alternatives you've considered.
—
Additional context.
No response