diff --git a/pkg/golinters/wrapcheck.go b/pkg/golinters/wrapcheck.go index 5fbc690d38a8..05546017a41d 100644 --- a/pkg/golinters/wrapcheck.go +++ b/pkg/golinters/wrapcheck.go @@ -10,9 +10,11 @@ import ( const wrapcheckName = "wrapcheck" -func NewWrapcheck(cfg config.WrapcheckSettings) *goanalysis.Linter { +func NewWrapcheck(cfg *config.WrapcheckSettings) *goanalysis.Linter { c := wrapcheck.NewDefaultConfig() - c.IgnoreSigs = cfg.IgnoreSigs + if cfg != nil { + c.IgnoreSigs = cfg.IgnoreSigs + } a := wrapcheck.NewAnalyzer(c)