From 9d2a90af8850a414d2da20b806d7aa8fd9a297ae Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 2 Apr 2024 14:37:40 +0000 Subject: mod: bump github.com/golangci/golangci-lint from 1.56.2 to 1.57.2 Bumps [github.com/golangci/golangci-lint](https://github.com/golangci/golangci-lint) from 1.56.2 to 1.57.2. - [Release notes](https://github.com/golangci/golangci-lint/releases) - [Changelog](https://github.com/golangci/golangci-lint/blob/master/CHANGELOG.md) - [Commits](https://github.com/golangci/golangci-lint/compare/v1.56.2...v1.57.2) --- updated-dependencies: - dependency-name: github.com/golangci/golangci-lint dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- .../kunwardeep/paralleltest/pkg/paralleltest/paralleltest.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'vendor/github.com/kunwardeep') diff --git a/vendor/github.com/kunwardeep/paralleltest/pkg/paralleltest/paralleltest.go b/vendor/github.com/kunwardeep/paralleltest/pkg/paralleltest/paralleltest.go index 1aecc1a51..e9187d6fd 100644 --- a/vendor/github.com/kunwardeep/paralleltest/pkg/paralleltest/paralleltest.go +++ b/vendor/github.com/kunwardeep/paralleltest/pkg/paralleltest/paralleltest.go @@ -26,6 +26,7 @@ type parallelAnalyzer struct { analyzer *analysis.Analyzer ignoreMissing bool ignoreMissingSubtests bool + ignoreLoopVar bool } func newParallelAnalyzer() *parallelAnalyzer { @@ -34,6 +35,7 @@ func newParallelAnalyzer() *parallelAnalyzer { var flags flag.FlagSet flags.BoolVar(&a.ignoreMissing, "i", false, "ignore missing calls to t.Parallel") flags.BoolVar(&a.ignoreMissingSubtests, "ignoremissingsubtests", false, "ignore missing calls to t.Parallel in subtests") + flags.BoolVar(&a.ignoreLoopVar, "ignoreloopVar", false, "ignore loop variable detection") a.analyzer = &analysis.Analyzer{ Name: "paralleltest", @@ -137,7 +139,7 @@ func (a *parallelAnalyzer) run(pass *analysis.Pass) (interface{}, error) { rangeStatementCantParallelMethod = methodSetenvIsCalledInMethodRun(r.X, innerTestVar) } - if loopVariableUsedInRun == nil { + if !a.ignoreLoopVar && loopVariableUsedInRun == nil { if run, ok := r.X.(*ast.CallExpr); ok { loopVariableUsedInRun = loopVarReferencedInRun(run, loopVars, pass.TypesInfo) } -- cgit mrf-deployment