Add "emptycase" linter #3489
Labels
enhancement
New feature or improvement
linter: new
Support new linter
no decision
No decision to fix or not
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.
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
The text was updated successfully, but these errors were encountered: