From c8f51f59b73d8b157744240b33b3dc91efff0d41 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Fri, 19 Feb 2021 20:43:09 +0100 Subject: .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 --- .golangci.yml | 4 ++++ 1 file changed, 4 insertions(+) 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: -- cgit mrf-deployment