diff options
author | Michael Pratt <mpratt@google.com> | 2021-08-13 11:29:30 -0700 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2021-08-13 11:31:55 -0700 |
commit | ed89602161fc8ca1f0dc425873d27e5b7ac2ed4a (patch) | |
tree | 00354b8e2ac82538b49f016b910cbcccde665110 | |
parent | 8f2b11a87e0c8fc89636617c9161caee9f8f1fb5 (diff) |
Disable SA1019 (deprecation check)
On Go tip (pre-1.18), http://golang.org/issue/44195 is making SA1019 mistake
uses of reflect.Value.Len for reflect.Value.InterfaceData, which is deprecated.
It is thus mistakenly raising deprecation errors on uses of reflect.Value.Len.
Suppress these errors by disabling SA1019 entirely. This is a bit overkill, but
it is unclear to me if we want hard errors on deprecation anyways. That can be
reevaluated when http://golang.org/issue/44195 is fixed.
The other staticcheck analyzers are moved to alphabetical order.
Updates golang/go#44195
PiperOrigin-RevId: 390655918
-rw-r--r-- | nogo.yaml | 30 |
1 files changed, 18 insertions, 12 deletions
@@ -161,29 +161,35 @@ analyzers: # targets in the standard library, so we still need to run # checklinkname on stdlib generally. - "linkname to unknown symbol" - SA4016: + SA1019: # Use of deprecated identifier. + # disable for now due to misattribution from golang.org/issue/44195. + generated: + exclude: [".*"] internal: - exclude: - - pkg/gohacks/gohacks_unsafe.go # x ^ 0 always equals x. - SA2001: + exclude: [".*"] + SA2001: # Empty critical section. internal: exclude: - pkg/sentry/fs/fs.go # Intentional. - pkg/sentry/fs/gofer/inode.go # Intentional. - pkg/refs/refcounter_test.go # Intentional. - ST1019: + SA4016: # Useless bitwise operations. + internal: + exclude: + - pkg/gohacks/gohacks_unsafe.go # x ^ 0 always equals x. + SA5011: # Possible nil pointer dereference. + internal: + exclude: + # https://github.com/dominikh/go-tools/issues/924 + - pkg/sentry/fs/fdpipe/pipe_opener_test.go + - pkg/tcpip/tests/integration/link_resolution_test.go + ST1019: # Multiple imports of the same package. generated: exclude: # package ".../kubeapi/core/v1/v1" is being imported more than once - generated.gen.pb.go - ST1021: + ST1021: # Doc should start with type name. internal: suppress: - "comment on exported type Translation" # Intentional. - "comment on exported type PinnedRange" # Intentional. - SA5011: - internal: - exclude: - # https://github.com/dominikh/go-tools/issues/924 - - pkg/sentry/fs/fdpipe/pipe_opener_test.go - - pkg/tcpip/tests/integration/link_resolution_test.go |