-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
lint: make staticcheck happy on go 1.12 #36527
Conversation
ugh, looks like the inline comment to disable the new rule doesn't play well on go 1.11 since there isn't a violation to disable there. |
the main issue is cgo generating 0==0, so we'll turn off that lint rule completely for now. Also, the regex copy rule is specific to go1.12 so we'll disable it on the log call while we still support go 1.11. Release note: none
switched to a glob-based ignore so it won't complain if it doesn't actually ignore anything. |
bors r+ |
36527: lint: make staticcheck happy on go 1.12 r=dt a=dt the main issue is cgo generating 0==0, so we'll turn off that lint rule completely for now. Also, the regex copy rule is specific to go1.12 so we'll disable it on the log call while we still support go 1.11. Release note: none Co-authored-by: David Taylor <[email protected]>
Build succeeded |
// TODO(dt): remove when https://github.com/dominikh/go-tools/issues/430 is resolved. | ||
ignoreSA4000{}, | ||
// We still support go 1.11 where regex.Copy avoids contention. | ||
&lint.GlobIgnore{Pattern: "github.com/cockroachdb/cockroach/pkg/util/log/clog.go", Checks: []string{"SA1019"}}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Once I fix dominikh/go-tools#437 you'll be able to use the -go 1.11
flag to not generate deprecation warnings for things that were deprecated in later versions.
the main issue is cgo generating 0==0, so we'll turn off that lint rule completely for now.
Also, the regex copy rule is specific to go1.12 so we'll disable it on the log call while we still support go 1.11.
Release note: none