mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2025-01-03 08:37:37 +00:00
d17826fb9d
* Add analysis template with failing test * Works for the most common use case * Progress on tool and more test cases * Improvements * handle nil * works for the most part * Fix some TODOs in the tool * Fix some TODOs in the tool
21 lines
386 B
Go
21 lines
386 B
Go
package logruswitherror
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/prysmaticlabs/prysm/build/bazel"
|
|
"golang.org/x/tools/go/analysis/analysistest"
|
|
)
|
|
|
|
func init() {
|
|
if bazel.BuiltWithBazel() {
|
|
bazel.SetGoEnv()
|
|
}
|
|
}
|
|
|
|
func TestAnalyzer(t *testing.T) {
|
|
testdata := bazel.TestDataPath(t)
|
|
analysistest.TestData = func() string { return testdata }
|
|
analysistest.Run(t, testdata, Analyzer, "a")
|
|
}
|