Skip to content

Commit 886fbd7

Browse files
authored
gci: fix panic with invalid configuration option (#3019)
1 parent d03608f commit 886fbd7

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

pkg/golinters/gci.go

+5-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,11 @@ func NewGci(settings *config.GciSettings) *goanalysis.Linter {
4646
rawCfg.SectionStrings = prefix
4747
}
4848

49-
cfg, _ = rawCfg.Parse()
49+
var err error
50+
cfg, err = rawCfg.Parse()
51+
if err != nil {
52+
linterLogger.Fatalf("gci: configuration parsing: %v", err)
53+
}
5054
}
5155

5256
var lock sync.Mutex

0 commit comments

Comments
 (0)