Skip to content

Commit

Permalink
gci: fix panic with invalid configuration option (#3019)
Browse files Browse the repository at this point in the history
  • Loading branch information
ldez authored Jul 27, 2022
1 parent d03608f commit 886fbd7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/golinters/gci.go
Original file line number Diff line number Diff line change
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 886fbd7

Please sign in to comment.