From 879821e7ffc2f532e7054b5001fe33833cc1078f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 29 Jun 2021 12:47:17 +0200 Subject: [PATCH] build(deps): bump github.com/daixiang0/gci from 0.2.8 to 0.2.9 (#2085) Co-authored-by: Fernandez Ludovic --- go.mod | 2 +- go.sum | 4 ++-- pkg/golinters/gci.go | 8 +++++++- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/go.mod b/go.mod index 87e73eff2116..4c315770e45d 100644 --- a/go.mod +++ b/go.mod @@ -13,7 +13,7 @@ require ( github.com/bkielbasa/cyclop v1.2.0 github.com/bombsimon/wsl/v3 v3.3.0 github.com/charithe/durationcheck v0.0.8 - github.com/daixiang0/gci v0.2.8 + github.com/daixiang0/gci v0.2.9 github.com/denis-tingajkin/go-header v0.4.2 github.com/esimonov/ifshort v1.0.2 github.com/fatih/color v1.12.0 diff --git a/go.sum b/go.sum index 92696383db4e..db14c8548698 100644 --- a/go.sum +++ b/go.sum @@ -126,8 +126,8 @@ github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:ma github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= -github.com/daixiang0/gci v0.2.8 h1:1mrIGMBQsBu0P7j7m1M8Lb+ZeZxsZL+jyGX4YoMJJpg= -github.com/daixiang0/gci v0.2.8/go.mod h1:+4dZ7TISfSmqfAGv59ePaHfNzgGtIkHAhhdKggP1JAc= +github.com/daixiang0/gci v0.2.9 h1:iwJvwQpBZmMg31w+QQ6jsyZ54KEATn6/nfARbBNW294= +github.com/daixiang0/gci v0.2.9/go.mod h1:+4dZ7TISfSmqfAGv59ePaHfNzgGtIkHAhhdKggP1JAc= github.com/davecgh/go-spew v0.0.0-20161028175848-04cdfd42973b/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= diff --git a/pkg/golinters/gci.go b/pkg/golinters/gci.go index 6fa43544e644..49effb81372e 100644 --- a/pkg/golinters/gci.go +++ b/pkg/golinters/gci.go @@ -3,6 +3,7 @@ package golinters import ( "bytes" "fmt" + "strings" "sync" "github.com/daixiang0/gci/pkg/gci" @@ -46,8 +47,13 @@ func NewGci() *goanalysis.Linter { var issues []goanalysis.Issue + flagSet := gci.FlagSet{} + if localFlag != "" { + flagSet.LocalFlag = strings.Split(localFlag, ",") + } + for _, f := range fileNames { - source, result, err := gci.Run(f, &gci.FlagSet{LocalFlag: localFlag}) + source, result, err := gci.Run(f, &flagSet) if err != nil { return nil, err }