Skip to content

Commit

Permalink
Nil checks
Browse files Browse the repository at this point in the history
  • Loading branch information
tomarrell committed Apr 30, 2021
1 parent 1908133 commit 6d38258
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pkg/golinters/wrapcheck.go
Expand Up @@ -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)

Expand Down

0 comments on commit 6d38258

Please sign in to comment.