cmd/vet: ignore build comments in string literals #17580
package p const buildtag = ` // +build abc `
$ go tool vet x.go x.go:4: +build comment must appear before package clause and be followed by a blank line
This is a detectable false positive. This is very unlikely to be an actual attempt at a build comment; it's inside a string literal. This happens when writing code generators. There's a concrete instance in TestBinaryOnlyPackages in cmd/go/go_test.go.
The text was updated successfully, but these errors were encountered: