build(deps): bump github.com/kunwardeep/paralleltest from 1.0.4 to 1.0.6 (#2918)
Co-authored-by: Fernandez Ludovic <ldez@users.noreply.github.com>
This commit is contained in:
parent
c766184c97
commit
97eea6ea49
@ -1152,6 +1152,11 @@ linters-settings:
|
|||||||
# Default: false
|
# Default: false
|
||||||
require-specific: true
|
require-specific: true
|
||||||
|
|
||||||
|
paralleltest:
|
||||||
|
# Ignore missing calls to `t.Parallel()` and only report incorrect uses of it.
|
||||||
|
# Default: false
|
||||||
|
ignore-missing: true
|
||||||
|
|
||||||
prealloc:
|
prealloc:
|
||||||
# IMPORTANT: we don't recommend using this linter before doing performance profiling.
|
# IMPORTANT: we don't recommend using this linter before doing performance profiling.
|
||||||
# For most programs usage of prealloc will be a premature optimization.
|
# For most programs usage of prealloc will be a premature optimization.
|
||||||
|
2
go.mod
2
go.mod
@ -49,7 +49,7 @@ require (
|
|||||||
github.com/julz/importas v0.1.0
|
github.com/julz/importas v0.1.0
|
||||||
github.com/kisielk/errcheck v1.6.1
|
github.com/kisielk/errcheck v1.6.1
|
||||||
github.com/kulti/thelper v0.6.3
|
github.com/kulti/thelper v0.6.3
|
||||||
github.com/kunwardeep/paralleltest v1.0.4
|
github.com/kunwardeep/paralleltest v1.0.6
|
||||||
github.com/kyoh86/exportloopref v0.1.8
|
github.com/kyoh86/exportloopref v0.1.8
|
||||||
github.com/ldez/gomoddirectives v0.2.3
|
github.com/ldez/gomoddirectives v0.2.3
|
||||||
github.com/ldez/tagliatelle v0.3.1
|
github.com/ldez/tagliatelle v0.3.1
|
||||||
|
4
go.sum
generated
4
go.sum
generated
@ -488,8 +488,8 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
|
|||||||
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
|
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
|
||||||
github.com/kulti/thelper v0.6.3 h1:ElhKf+AlItIu+xGnI990no4cE2+XaSu1ULymV2Yulxs=
|
github.com/kulti/thelper v0.6.3 h1:ElhKf+AlItIu+xGnI990no4cE2+XaSu1ULymV2Yulxs=
|
||||||
github.com/kulti/thelper v0.6.3/go.mod h1:DsqKShOvP40epevkFrvIwkCMNYxMeTNjdWL4dqWHZ6I=
|
github.com/kulti/thelper v0.6.3/go.mod h1:DsqKShOvP40epevkFrvIwkCMNYxMeTNjdWL4dqWHZ6I=
|
||||||
github.com/kunwardeep/paralleltest v1.0.4 h1:4hBG0jsh8mELqkU9fUtzsXPp7jOlm86DywicsSwet3E=
|
github.com/kunwardeep/paralleltest v1.0.6 h1:FCKYMF1OF2+RveWlABsdnmsvJrei5aoyZoaGS+Ugg8g=
|
||||||
github.com/kunwardeep/paralleltest v1.0.4/go.mod h1:vLydzomDFpk7yu5UX02RmP0H8QfRPOV/oFhWN85Mjb4=
|
github.com/kunwardeep/paralleltest v1.0.6/go.mod h1:Y0Y0XISdZM5IKm3TREQMZ6iteqn1YuwCsJO/0kL9Zes=
|
||||||
github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw=
|
github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw=
|
||||||
github.com/kyoh86/exportloopref v0.1.8 h1:5Ry/at+eFdkX9Vsdw3qU4YkvGtzuVfzT4X7S77LoN/M=
|
github.com/kyoh86/exportloopref v0.1.8 h1:5Ry/at+eFdkX9Vsdw3qU4YkvGtzuVfzT4X7S77LoN/M=
|
||||||
github.com/kyoh86/exportloopref v0.1.8/go.mod h1:1tUcJeiioIs7VWe5gcOObrux3lb66+sBqGZrRkMwPgg=
|
github.com/kyoh86/exportloopref v0.1.8/go.mod h1:1tUcJeiioIs7VWe5gcOObrux3lb66+sBqGZrRkMwPgg=
|
||||||
|
@ -158,6 +158,7 @@ type LintersSettings struct {
|
|||||||
NilNil NilNilSettings
|
NilNil NilNilSettings
|
||||||
Nlreturn NlreturnSettings
|
Nlreturn NlreturnSettings
|
||||||
NoLintLint NoLintLintSettings
|
NoLintLint NoLintLintSettings
|
||||||
|
ParallelTest ParallelTestSettings
|
||||||
Prealloc PreallocSettings
|
Prealloc PreallocSettings
|
||||||
Predeclared PredeclaredSettings
|
Predeclared PredeclaredSettings
|
||||||
Promlinter PromlinterSettings
|
Promlinter PromlinterSettings
|
||||||
@ -481,6 +482,10 @@ type NoLintLintSettings struct {
|
|||||||
AllowUnused bool `mapstructure:"allow-unused"`
|
AllowUnused bool `mapstructure:"allow-unused"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type ParallelTestSettings struct {
|
||||||
|
IgnoreMissing bool `mapstructure:"ignore-missing"`
|
||||||
|
}
|
||||||
|
|
||||||
type PreallocSettings struct {
|
type PreallocSettings struct {
|
||||||
Simple bool
|
Simple bool
|
||||||
RangeLoops bool `mapstructure:"range-loops"`
|
RangeLoops bool `mapstructure:"range-loops"`
|
||||||
|
@ -4,14 +4,26 @@ import (
|
|||||||
"github.com/kunwardeep/paralleltest/pkg/paralleltest"
|
"github.com/kunwardeep/paralleltest/pkg/paralleltest"
|
||||||
"golang.org/x/tools/go/analysis"
|
"golang.org/x/tools/go/analysis"
|
||||||
|
|
||||||
|
"github.com/golangci/golangci-lint/pkg/config"
|
||||||
"github.com/golangci/golangci-lint/pkg/golinters/goanalysis"
|
"github.com/golangci/golangci-lint/pkg/golinters/goanalysis"
|
||||||
)
|
)
|
||||||
|
|
||||||
func NewParallelTest() *goanalysis.Linter {
|
func NewParallelTest(settings *config.ParallelTestSettings) *goanalysis.Linter {
|
||||||
|
a := paralleltest.Analyzer
|
||||||
|
|
||||||
|
var cfg map[string]map[string]interface{}
|
||||||
|
if settings != nil {
|
||||||
|
cfg = map[string]map[string]interface{}{
|
||||||
|
a.Name: {
|
||||||
|
"i": settings.IgnoreMissing,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return goanalysis.NewLinter(
|
return goanalysis.NewLinter(
|
||||||
"paralleltest",
|
"paralleltest",
|
||||||
"paralleltest detects missing usage of t.Parallel() method in your Go test",
|
"paralleltest detects missing usage of t.Parallel() method in your Go test",
|
||||||
[]*analysis.Analyzer{paralleltest.NewAnalyzer()},
|
[]*analysis.Analyzer{paralleltest.Analyzer},
|
||||||
nil,
|
cfg,
|
||||||
).WithLoadMode(goanalysis.LoadModeTypesInfo)
|
).WithLoadMode(goanalysis.LoadModeTypesInfo)
|
||||||
}
|
}
|
||||||
|
@ -147,6 +147,7 @@ func (m Manager) GetAllSupportedLinterConfigs() []*linter.Config {
|
|||||||
nilNilCfg *config.NilNilSettings
|
nilNilCfg *config.NilNilSettings
|
||||||
nlreturnCfg *config.NlreturnSettings
|
nlreturnCfg *config.NlreturnSettings
|
||||||
noLintLintCfg *config.NoLintLintSettings
|
noLintLintCfg *config.NoLintLintSettings
|
||||||
|
parallelTestCfg *config.ParallelTestSettings
|
||||||
preallocCfg *config.PreallocSettings
|
preallocCfg *config.PreallocSettings
|
||||||
predeclaredCfg *config.PredeclaredSettings
|
predeclaredCfg *config.PredeclaredSettings
|
||||||
promlinterCfg *config.PromlinterSettings
|
promlinterCfg *config.PromlinterSettings
|
||||||
@ -216,6 +217,7 @@ func (m Manager) GetAllSupportedLinterConfigs() []*linter.Config {
|
|||||||
nlreturnCfg = &m.cfg.LintersSettings.Nlreturn
|
nlreturnCfg = &m.cfg.LintersSettings.Nlreturn
|
||||||
noLintLintCfg = &m.cfg.LintersSettings.NoLintLint
|
noLintLintCfg = &m.cfg.LintersSettings.NoLintLint
|
||||||
preallocCfg = &m.cfg.LintersSettings.Prealloc
|
preallocCfg = &m.cfg.LintersSettings.Prealloc
|
||||||
|
parallelTestCfg = &m.cfg.LintersSettings.ParallelTest
|
||||||
predeclaredCfg = &m.cfg.LintersSettings.Predeclared
|
predeclaredCfg = &m.cfg.LintersSettings.Predeclared
|
||||||
promlinterCfg = &m.cfg.LintersSettings.Promlinter
|
promlinterCfg = &m.cfg.LintersSettings.Promlinter
|
||||||
reviveCfg = &m.cfg.LintersSettings.Revive
|
reviveCfg = &m.cfg.LintersSettings.Revive
|
||||||
@ -614,7 +616,7 @@ func (m Manager) GetAllSupportedLinterConfigs() []*linter.Config {
|
|||||||
WithPresets(linter.PresetStyle).
|
WithPresets(linter.PresetStyle).
|
||||||
WithURL("https://github.com/stbenjam/no-sprintf-host-port"),
|
WithURL("https://github.com/stbenjam/no-sprintf-host-port"),
|
||||||
|
|
||||||
linter.NewConfig(golinters.NewParallelTest()).
|
linter.NewConfig(golinters.NewParallelTest(parallelTestCfg)).
|
||||||
WithSince("v1.33.0").
|
WithSince("v1.33.0").
|
||||||
WithLoadForGoAnalysis().
|
WithLoadForGoAnalysis().
|
||||||
WithPresets(linter.PresetStyle, linter.PresetTest).
|
WithPresets(linter.PresetStyle, linter.PresetTest).
|
||||||
|
Loading…
x
Reference in New Issue
Block a user