Update Vendors: (#129)
* github.com/araddon/dateparse upgrade => v0.0.0-20200409225146-d820a6159ab1 * code.gitea.io/sdk/gitea upgrade => v0.11.3 * github.com/olekukonko/tablewriter upgrade => v0.0.4 * github.com/mattn/go-runewidth upgrade => v0.0.9 * github.com/stretchr/testify upgrade => v1.5.1 * github.com/davecgh/go-spew upgrade => v1.1.1 * github.com/urfave/cli/v2 upgrade => v2.2.0 Co-authored-by: 6543 <6543@obermui.de> Reviewed-on: https://gitea.com/gitea/tea/pulls/129 Reviewed-by: techknowlogick <techknowlogick@gitea.io> Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
This commit is contained in:
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.
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user