golangci-lint/pkg/golinters/typecheck.go
2024-04-18 21:45:50 +02:00

25 lines
518 B
Go

package golinters
import (
"golang.org/x/tools/go/analysis"
"github.com/golangci/golangci-lint/pkg/goanalysis"
)
func NewTypecheck() *goanalysis.Linter {
const linterName = "typecheck"
analyzer := &analysis.Analyzer{
Name: linterName,
Doc: goanalysis.TheOnlyanalyzerDoc,
Run: goanalysis.DummyRun,
}
return goanalysis.NewLinter(
linterName,
"Like the front-end of a Go compiler, parses and type-checks Go code",
[]*analysis.Analyzer{analyzer},
nil,
).WithLoadMode(goanalysis.LoadModeNone)
}