Skip to content

Commit 54f4301

Browse files
authored
gci: Parse the settings more similarly to the cli (#2217)
1 parent 4ab17bd commit 54f4301

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

pkg/golinters/gci.go

+2-4
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ package golinters
33
import (
44
"bytes"
55
"fmt"
6-
"strings"
76
"sync"
87

98
"github.com/daixiang0/gci/pkg/gci"
@@ -47,9 +46,8 @@ func NewGci() *goanalysis.Linter {
4746

4847
var issues []goanalysis.Issue
4948

50-
flagSet := gci.FlagSet{}
51-
if localFlag != "" {
52-
flagSet.LocalFlag = strings.Split(localFlag, ",")
49+
flagSet := gci.FlagSet{
50+
LocalFlag: gci.ParseLocalFlag(localFlag),
5351
}
5452

5553
for _, f := range fileNames {

0 commit comments

Comments
 (0)