From 91b244d2f53956ba1cb0b44e7ef8a1bc6a28e3dc Mon Sep 17 00:00:00 2001 From: Tom Arrell Date: Fri, 30 Apr 2021 17:46:53 +0200 Subject: [PATCH] Length check config value --- pkg/golinters/wrapcheck.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/golinters/wrapcheck.go b/pkg/golinters/wrapcheck.go index 05546017a41d..39fea504b1e0 100644 --- a/pkg/golinters/wrapcheck.go +++ b/pkg/golinters/wrapcheck.go @@ -13,7 +13,9 @@ const wrapcheckName = "wrapcheck" func NewWrapcheck(cfg *config.WrapcheckSettings) *goanalysis.Linter { c := wrapcheck.NewDefaultConfig() if cfg != nil { - c.IgnoreSigs = cfg.IgnoreSigs + if len(cfg.IgnoreSigs) != 0 { + c.IgnoreSigs = cfg.IgnoreSigs + } } a := wrapcheck.NewAnalyzer(c)