File tree 5 files changed +15
-5
lines changed
5 files changed +15
-5
lines changed Original file line number Diff line number Diff line change @@ -1340,6 +1340,10 @@ linters-settings:
1340
1340
# Ignore missing calls to `t.Parallel()` and only report incorrect uses of it.
1341
1341
# Default: false
1342
1342
ignore-missing : true
1343
+ # Ignore missing calls to `t.Parallel()` in subtests. Top-level tests are
1344
+ # still required to have `t.Parallel`, but subtests are allowed to skip it.
1345
+ # Default: false
1346
+ ignore-missing-subtests : true
1343
1347
1344
1348
prealloc :
1345
1349
# IMPORTANT: we don't recommend using this linter before doing performance profiling.
Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ require (
58
58
github.com/kisielk/errcheck v1.6.3
59
59
github.com/kkHAIKE/contextcheck v1.1.4
60
60
github.com/kulti/thelper v0.6.3
61
- github.com/kunwardeep/paralleltest v1.0.7
61
+ github.com/kunwardeep/paralleltest v1.0.8
62
62
github.com/kyoh86/exportloopref v0.1.11
63
63
github.com/ldez/gomoddirectives v0.2.3
64
64
github.com/ldez/tagliatelle v0.5.0
@@ -117,7 +117,7 @@ require (
117
117
gitlab.com/bosi/decorder v0.4.0
118
118
go.tmz.dev/musttag v0.7.1
119
119
golang.org/x/exp v0.0.0-20230510235704-dd950f8aeaea
120
- golang.org/x/tools v0.11.0
120
+ golang.org/x/tools v0.11.1
121
121
gopkg.in/yaml.v3 v3.0.1
122
122
honnef.co/go/tools v0.4.3
123
123
mvdan.cc/gofumpt v0.5.0
Original file line number Diff line number Diff line change @@ -655,7 +655,8 @@ type NoNamedReturnsSettings struct {
655
655
ReportErrorInDefer bool `mapstructure:"report-error-in-defer"`
656
656
}
657
657
type ParallelTestSettings struct {
658
- IgnoreMissing bool `mapstructure:"ignore-missing"`
658
+ IgnoreMissing bool `mapstructure:"ignore-missing"`
659
+ IgnoreMissingSubtests bool `mapstructure:"ignore-missing-subtests"`
659
660
}
660
661
661
662
type PreallocSettings struct {
Original file line number Diff line number Diff line change @@ -9,13 +9,14 @@ import (
9
9
)
10
10
11
11
func NewParallelTest (settings * config.ParallelTestSettings ) * goanalysis.Linter {
12
- a := paralleltest .Analyzer
12
+ a := paralleltest .NewAnalyzer ()
13
13
14
14
var cfg map [string ]map [string ]any
15
15
if settings != nil {
16
16
cfg = map [string ]map [string ]any {
17
17
a .Name : {
18
- "i" : settings .IgnoreMissing ,
18
+ "i" : settings .IgnoreMissing ,
19
+ "ignoremissingsubtests" : settings .IgnoreMissingSubtests ,
19
20
},
20
21
}
21
22
}
You can’t perform that action at this time.
0 commit comments