Skip to content

Commit

Permalink
gci: fix panic with invalid configuration option (golangci#3019)
Browse files Browse the repository at this point in the history
  • Loading branch information
ldez authored and SeigeC committed Apr 4, 2023
1 parent 64dd767 commit 39b06d1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/golinters/gci.go
Expand Up @@ -46,7 +46,11 @@ func NewGci(settings *config.GciSettings) *goanalysis.Linter {
rawCfg.SectionStrings = prefix
}

cfg, _ = rawCfg.Parse()
var err error
cfg, err = rawCfg.Parse()
if err != nil {
linterLogger.Fatalf("gci: configuration parsing: %v", err)
}
}

var lock sync.Mutex
Expand Down

0 comments on commit 39b06d1

Please sign in to comment.