@@ -20,18 +20,18 @@ import (
2020 "github.com/golangci/golangci-lint/test/testshared"
2121)
2222
23- func chdir (b * testing.B , dir string ) {
23+ func chdir (b testing.TB , dir string ) {
2424 if err := os .Chdir (dir ); err != nil {
2525 b .Fatalf ("can't chdir to %s: %s" , dir , err )
2626 }
2727}
2828
29- func prepareGoSource (b * testing.B ) {
29+ func prepareGoSource (b testing.TB ) {
3030 chdir (b , filepath .Join (build .Default .GOROOT , "src" ))
3131}
3232
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 ) {
3535 dir := filepath .Join (build .Default .GOPATH , "src" , "github.com" , owner , name )
3636 _ , err := os .Stat (dir )
3737 if os .IsNotExist (err ) {
@@ -79,7 +79,7 @@ func getGolangciLintCommonArgs() []string {
7979 return []string {"run" , "--no-config" , "--issues-exit-code=0" , "--deadline=30m" , "--disable-all" , "--enable=govet" }
8080}
8181
82- func runGolangciLintForBench (b * testing.B ) {
82+ func runGolangciLintForBench (b testing.TB ) {
8383 args := getGolangciLintCommonArgs ()
8484 args = append (args , getBenchLintersArgs ()... )
8585 printCommand ("golangci-lint" , args ... )
@@ -180,7 +180,7 @@ type runResult struct {
180180 duration time.Duration
181181}
182182
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 {
184184 doneCh := make (chan struct {})
185185 peakMemCh := trackPeakMemoryUsage (b , doneCh , progName )
186186 startedAt := time .Now ()
@@ -200,7 +200,7 @@ func BenchmarkGolangciLint(b *testing.B) {
200200
201201 type bcase struct {
202202 name string
203- prepare func (* testing.B )
203+ prepare func (testing.TB )
204204 }
205205 bcases := []bcase {
206206 {
0 commit comments