Skip to content

Commit

Permalink
build(deps): bump github.com/kunwardeep/paralleltest from 1.0.9 to 1.…
Browse files Browse the repository at this point in the history
…0.10 (#4394)

Co-authored-by: Fernandez Ludovic <ldez@users.noreply.github.com>
  • Loading branch information
dependabot[bot] and ldez authored Feb 16, 2024
1 parent 2417da1 commit f4e33e0
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 10 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ require (
github.com/kisielk/errcheck v1.7.0
github.com/kkHAIKE/contextcheck v1.1.4
github.com/kulti/thelper v0.6.3
github.com/kunwardeep/paralleltest v1.0.9
github.com/kunwardeep/paralleltest v1.0.10
github.com/kyoh86/exportloopref v0.1.11
github.com/ldez/gomoddirectives v0.2.3
github.com/ldez/tagliatelle v0.5.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions pkg/config/linters_settings.go
Original file line number Diff line number Diff line change
Expand Up @@ -703,8 +703,9 @@ type NoNamedReturnsSettings struct {
}

type ParallelTestSettings struct {
IgnoreMissing bool `mapstructure:"ignore-missing"`
IgnoreMissingSubtests bool `mapstructure:"ignore-missing-subtests"`
Go string `mapstructure:"-"`
IgnoreMissing bool `mapstructure:"ignore-missing"`
IgnoreMissingSubtests bool `mapstructure:"ignore-missing-subtests"`
}

type PerfSprintSettings struct {
Expand Down
14 changes: 9 additions & 5 deletions pkg/golinters/paralleltest.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,16 @@ func NewParallelTest(settings *config.ParallelTestSettings) *goanalysis.Linter {

var cfg map[string]map[string]any
if settings != nil {
cfg = map[string]map[string]any{
a.Name: {
"i": settings.IgnoreMissing,
"ignoremissingsubtests": settings.IgnoreMissingSubtests,
},
d := map[string]any{
"i": settings.IgnoreMissing,
"ignoremissingsubtests": settings.IgnoreMissingSubtests,
}

if config.IsGreaterThanOrEqualGo122(settings.Go) {
d["ignoreloopVar"] = true
}

cfg = map[string]map[string]any{a.Name: d}
}

return goanalysis.NewLinter(
Expand Down
2 changes: 2 additions & 0 deletions pkg/lint/lintersdb/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,8 @@ func (m Manager) GetAllSupportedLinterConfigs() []*linter.Config {

govetCfg.Go = m.cfg.Run.Go

parallelTestCfg.Go = m.cfg.Run.Go

gocriticCfg.Go = trimGoVersion(m.cfg.Run.Go)

if gofumptCfg.LangVersion == "" {
Expand Down

0 comments on commit f4e33e0

Please sign in to comment.