github.com/golangci/go-tools@v0.0.0-20190318060251-af6baa5dc196/staticcheck/lint_test.go (about) 1 package staticcheck 2 3 import ( 4 "testing" 5 6 "github.com/golangci/go-tools/lint" 7 "github.com/golangci/go-tools/lint/lintutil" 8 "github.com/golangci/go-tools/lint/testutil" 9 ) 10 11 func TestAll(t *testing.T) { 12 c := NewChecker() 13 testutil.TestAll(t, c, "") 14 } 15 16 func BenchmarkStdlib(b *testing.B) { 17 for i := 0; i < b.N; i++ { 18 c := NewChecker() 19 _, err := lintutil.Lint([]lint.Checker{c}, []string{"std"}, nil) 20 if err != nil { 21 b.Fatal(err) 22 } 23 } 24 } 25 26 func BenchmarkNetHttp(b *testing.B) { 27 for i := 0; i < b.N; i++ { 28 c := NewChecker() 29 _, err := lintutil.Lint([]lint.Checker{c}, []string{"net/http"}, nil) 30 if err != nil { 31 b.Fatal(err) 32 } 33 } 34 }