Update gitea-vet to v0.2.1 (#12282)
* change to new code location * vendor * tagged version v0.2.0 * gitea-vet v0.2.1 Co-authored-by: techknowlogick <techknowlogick@gitea.io>
This commit is contained in:
parent
eb60a5d054
commit
ee97e6a66a
52 changed files with 3421 additions and 403 deletions
16
vendor/golang.org/x/tools/go/analysis/analysis.go
generated
vendored
16
vendor/golang.org/x/tools/go/analysis/analysis.go
generated
vendored
|
@ -7,6 +7,8 @@ import (
|
|||
"go/token"
|
||||
"go/types"
|
||||
"reflect"
|
||||
|
||||
"golang.org/x/tools/internal/analysisinternal"
|
||||
)
|
||||
|
||||
// An Analyzer describes an analysis function and its options.
|
||||
|
@ -69,6 +71,17 @@ type Analyzer struct {
|
|||
|
||||
func (a *Analyzer) String() string { return a.Name }
|
||||
|
||||
func init() {
|
||||
// Set the analysisinternal functions to be able to pass type errors
|
||||
// to the Pass type without modifying the go/analysis API.
|
||||
analysisinternal.SetTypeErrors = func(p interface{}, errors []types.Error) {
|
||||
p.(*Pass).typeErrors = errors
|
||||
}
|
||||
analysisinternal.GetTypeErrors = func(p interface{}) []types.Error {
|
||||
return p.(*Pass).typeErrors
|
||||
}
|
||||
}
|
||||
|
||||
// A Pass provides information to the Run function that
|
||||
// applies a specific analyzer to a single Go package.
|
||||
//
|
||||
|
@ -138,6 +151,9 @@ type Pass struct {
|
|||
// WARNING: This is an experimental API and may change in the future.
|
||||
AllObjectFacts func() []ObjectFact
|
||||
|
||||
// typeErrors contains types.Errors that are associated with the pkg.
|
||||
typeErrors []types.Error
|
||||
|
||||
/* Further fields may be added in future. */
|
||||
// For example, suggested or applied refactorings.
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue