golang/lint — pull request #72 by jboelter (2014-09-26 06:18:20+00:00)
Title: Flag switch case statements that are not explicit in what they do

I got burned by a case statement that didn't fallthrough. This will flag case statements that don't have an explicit action associated with them and/or appear to not do any actual work. testdata/switch.go is pretty straightforward.

I ran this across a wide range of packages and didn't find any obvious failures, although a good number of false positives appear. They generally appear to be an intentional use of the lack of implicit fallthrough (at least when commented). Others are suspect. Personally, I write a break statement in when I mean it.

(Note: I did not commit golint.go w/ a new package reference if you're testing this)