diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2021-02-19 20:43:09 +0100 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2021-02-20 09:22:19 +0100 |
| commit | c8f51f59b73d8b157744240b33b3dc91efff0d41 (patch) | |
| tree | 4d1cebab23c8078f4cb38f660fcea48890b16448 | |
| parent | f689d40a08ae1c9d73d043e7a2e807bc4022931b (diff) | |
.golangci.yml: disable staticcheck nil pointer deref check
Currently it produces false reports with Go1.16:
tools/syz-runtest/runtest.go:271:6: SA5011: possible nil pointer dereference
req.Output = a.Output
^
tools/syz-runtest/runtest.go:272:6: SA5011: possible nil pointer dereference
req.Info = a.Info
^
sys/fuchsia/fidlgen/main.go:27:17: SA5011: possible nil pointer dereference
arch := target.KernelHeaderArch
^
All these are preceeded with log.Fatalf, which is strange...
Update #2446
| -rw-r--r-- | .golangci.yml | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/.golangci.yml b/.golangci.yml index 624fc58e8..cb0306b56 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -41,6 +41,7 @@ linters: - gocognit - funlen - dupl + - staticcheck - syz-linter disable: - bodyclose @@ -102,6 +103,9 @@ issues: - "exported .* should have comment" - "comment on .* should be of the form" - "at least one file in a package should have a package comment" + # This check gives false positives related to the standard log.Fatalf + # (which is strange, standard log package should be supported).# + - "SA5011: possible nil pointer dereference" exclude-rules: - path: (pkg/csource/generated.go|pkg/build/linux_generated.go) linters: |
