Skip to content

Commit 0e30a23

Browse files
committed
Nil checks
1 parent fd25941 commit 0e30a23

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

pkg/golinters/wrapcheck.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,11 @@ import (
1010

1111
const wrapcheckName = "wrapcheck"
1212

13-
func NewWrapcheck(cfg config.WrapcheckSettings) *goanalysis.Linter {
13+
func NewWrapcheck(cfg *config.WrapcheckSettings) *goanalysis.Linter {
1414
c := wrapcheck.NewDefaultConfig()
15-
c.IgnoreSigs = cfg.IgnoreSigs
15+
if cfg != nil {
16+
c.IgnoreSigs = cfg.IgnoreSigs
17+
}
1618

1719
a := wrapcheck.NewAnalyzer(c)
1820

0 commit comments

Comments
 (0)