Skip to content

Commit 94d5fda

Browse files
committed
fix: flag parsing
1 parent bceb480 commit 94d5fda

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pkg/golinters/gci.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package golinters
33
import (
44
"bytes"
55
"fmt"
6+
"strings"
67
"sync"
78

89
"github.com/daixiang0/gci/pkg/gci"
@@ -47,7 +48,7 @@ func NewGci() *goanalysis.Linter {
4748
var issues []goanalysis.Issue
4849

4950
for _, f := range fileNames {
50-
source, result, err := gci.Run(f, &gci.FlagSet{LocalFlag: localFlag})
51+
source, result, err := gci.Run(f, &gci.FlagSet{LocalFlag: strings.Split(localFlag, ",")})
5152
if err != nil {
5253
return nil, err
5354
}

0 commit comments

Comments
 (0)