gci: Parse the settings more similarly to the cli (#2217)
Some checks failed
Extra / Vulnerability scanner (push) Has been cancelled
CI / go-mod (push) Has been cancelled
CI / golangci-lint (push) Has been cancelled
Release a tag / release (push) Has been cancelled
CI / tests-on-windows (push) Has been cancelled
CI / tests-on-macos (push) Has been cancelled
CI / tests-on-unix (1.15) (push) Has been cancelled
CI / tests-on-unix (1.16) (push) Has been cancelled
CI / tests-on-unix (1.17) (push) Has been cancelled
CI / check_generated (push) Has been cancelled
Release a tag / docker-release (map[Dockerfile:build/Dockerfile.alpine]) (push) Has been cancelled
Release a tag / docker-release (map[Dockerfile:build/Dockerfile]) (push) Has been cancelled

This commit is contained in:
Luke Shumaker 2021-09-04 08:39:09 -06:00 committed by GitHub
parent 4ab17bde5c
commit 54f4301ddf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3,7 +3,6 @@ package golinters
import ( import (
"bytes" "bytes"
"fmt" "fmt"
"strings"
"sync" "sync"
"github.com/daixiang0/gci/pkg/gci" "github.com/daixiang0/gci/pkg/gci"
@ -47,9 +46,8 @@ func NewGci() *goanalysis.Linter {
var issues []goanalysis.Issue var issues []goanalysis.Issue
flagSet := gci.FlagSet{} flagSet := gci.FlagSet{
if localFlag != "" { LocalFlag: gci.ParseLocalFlag(localFlag),
flagSet.LocalFlag = strings.Split(localFlag, ",")
} }
for _, f := range fileNames { for _, f := range fileNames {