diff --git a/go.mod b/go.mod index 5a644e78654c..aad95cd76b7f 100644 --- a/go.mod +++ b/go.mod @@ -66,7 +66,7 @@ require ( github.com/kunwardeep/paralleltest v1.0.10 github.com/kyoh86/exportloopref v0.1.11 github.com/lasiar/canonicalheader v1.1.2 - github.com/ldez/gomoddirectives v0.2.4 + github.com/ldez/gomoddirectives v0.4.2 github.com/ldez/tagliatelle v0.6.0 github.com/ldez/usetesting v0.2.0 github.com/leonklingele/grouper v1.1.2 @@ -164,6 +164,7 @@ require ( github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect github.com/hashicorp/hcl v1.0.0 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect + github.com/ldez/grignotin v0.6.0 // indirect github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect github.com/magiconair/properties v1.8.6 // indirect github.com/mattn/go-isatty v0.0.20 // indirect diff --git a/go.sum b/go.sum index bad06f7c0b72..d204bf8901cd 100644 --- a/go.sum +++ b/go.sum @@ -351,8 +351,10 @@ github.com/kyoh86/exportloopref v0.1.11 h1:1Z0bcmTypkL3Q4k+IDHMWTcnCliEZcaPiIe0/ github.com/kyoh86/exportloopref v0.1.11/go.mod h1:qkV4UF1zGl6EkF1ox8L5t9SwyeBAZ3qLMd6up458uqA= github.com/lasiar/canonicalheader v1.1.2 h1:vZ5uqwvDbyJCnMhmFYimgMZnJMjwljN5VGY0VKbMXb4= github.com/lasiar/canonicalheader v1.1.2/go.mod h1:qJCeLFS0G/QlLQ506T+Fk/fWMa2VmBUiEI2cuMK4djI= -github.com/ldez/gomoddirectives v0.2.4 h1:j3YjBIjEBbqZ0NKtBNzr8rtMHTOrLPeiwTkfUJZ3alg= -github.com/ldez/gomoddirectives v0.2.4/go.mod h1:oWu9i62VcQDYp9EQ0ONTfqLNh+mDLWWDO+SO0qSQw5g= +github.com/ldez/gomoddirectives v0.4.2 h1:qyiKJ97kyIZz8zi0qeKiXI73xEvQcDks4Tc/oN6R2eg= +github.com/ldez/gomoddirectives v0.4.2/go.mod h1:TuwOGYoPAoENDWQpe8DMqEm5nIfjrxZXmxX/CExWyZ4= +github.com/ldez/grignotin v0.6.0 h1:i++3002hxD5TpVto0iLjLrfz1V+yEJ+BBk4glb3aqC8= +github.com/ldez/grignotin v0.6.0/go.mod h1:uaVTr0SoZ1KBii33c47O1M8Jp3OP3YDwhZCmzT9GHEk= github.com/ldez/tagliatelle v0.6.0 h1:1Muumft/shmQ0x96vA6a/OUgTjamRt8jUlZPLm1ruwA= github.com/ldez/tagliatelle v0.6.0/go.mod h1:WeZ7TgEqq7fw/0Zj8BuQhh4+4KX1/+g0O11eygvClRA= github.com/ldez/usetesting v0.2.0 h1:RnQ7HRVInPwsuX3FPesE/HxngIk3UrqEuDu20LMd2tI= diff --git a/pkg/golinters/gomoddirectives/gomoddirectives.go b/pkg/golinters/gomoddirectives/gomoddirectives.go index 9cde7e26c69e..8fccbc89e11e 100644 --- a/pkg/golinters/gomoddirectives/gomoddirectives.go +++ b/pkg/golinters/gomoddirectives/gomoddirectives.go @@ -40,7 +40,7 @@ func New(settings *config.GoModDirectivesSettings) *goanalysis.Linter { ).WithContextSetter(func(lintCtx *linter.Context) { analyzer.Run = func(pass *analysis.Pass) (any, error) { once.Do(func() { - results, err := gomoddirectives.Analyze(opts) + results, err := gomoddirectives.AnalyzePass(pass, opts) if err != nil { lintCtx.Log.Warnf("running %s failed: %s: "+ "if you are not using go modules it is suggested to disable this linter", linterName, err)