@@ -20,18 +20,18 @@ import (
20
20
"github.com/golangci/golangci-lint/test/testshared"
21
21
)
22
22
23
- func chdir (b * testing.B , dir string ) {
23
+ func chdir (b testing.TB , dir string ) {
24
24
if err := os .Chdir (dir ); err != nil {
25
25
b .Fatalf ("can't chdir to %s: %s" , dir , err )
26
26
}
27
27
}
28
28
29
- func prepareGoSource (b * testing.B ) {
29
+ func prepareGoSource (b testing.TB ) {
30
30
chdir (b , filepath .Join (build .Default .GOROOT , "src" ))
31
31
}
32
32
33
- func prepareGithubProject (owner , name string ) func (* testing.B ) {
34
- return func (b * testing.B ) {
33
+ func prepareGithubProject (owner , name string ) func (testing.TB ) {
34
+ return func (b testing.TB ) {
35
35
dir := filepath .Join (build .Default .GOPATH , "src" , "github.com" , owner , name )
36
36
_ , err := os .Stat (dir )
37
37
if os .IsNotExist (err ) {
@@ -79,7 +79,7 @@ func getGolangciLintCommonArgs() []string {
79
79
return []string {"run" , "--no-config" , "--issues-exit-code=0" , "--deadline=30m" , "--disable-all" , "--enable=govet" }
80
80
}
81
81
82
- func runGolangciLintForBench (b * testing.B ) {
82
+ func runGolangciLintForBench (b testing.TB ) {
83
83
args := getGolangciLintCommonArgs ()
84
84
args = append (args , getBenchLintersArgs ()... )
85
85
printCommand ("golangci-lint" , args ... )
@@ -180,7 +180,7 @@ type runResult struct {
180
180
duration time.Duration
181
181
}
182
182
183
- func runOne (b * testing.B , run func (* testing.B ), progName string ) * runResult {
183
+ func runOne (b * testing.B , run func (testing.TB ), progName string ) * runResult {
184
184
doneCh := make (chan struct {})
185
185
peakMemCh := trackPeakMemoryUsage (b , doneCh , progName )
186
186
startedAt := time .Now ()
@@ -200,7 +200,7 @@ func BenchmarkGolangciLint(b *testing.B) {
200
200
201
201
type bcase struct {
202
202
name string
203
- prepare func (* testing.B )
203
+ prepare func (testing.TB )
204
204
}
205
205
bcases := []bcase {
206
206
{
0 commit comments