Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
lint: avoid suggesting to use a keyword as a valid name
In some circumstances the programmer is tempted to use a Go reserved keyword as a name. A common ofender is the word "type". The Go compiler will not accept that, of course. In those situations a common strategy is to append an underline to the keyword, in order to make the compiler happy. Thus, the name "type" would be changed to "type_" and so on. The golint considered that use of underline as bad style and was wrongly suggesting as a corrective action employing the original keyword as name: astVarRef.go:6:2: don't use underscores in Go names; struct field type_ should be type cmdIf.go:32:3: don't use underscores in Go names; var goto_ should be goto This CL changes golint so that it doesn't make such invalid suggestion. Fixes golang#393
- Loading branch information