Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Deprecated = &analysis.Analyzer{ Name: "fact_deprecated", Doc: "Mark deprecated objects", Run: deprecated, FactTypes: []analysis.Fact{(*IsDeprecated)(nil)}, ResultType: reflect.TypeOf(DeprecatedResult{}), }
View Source
var Directives = &analysis.Analyzer{ Name: "directives", Doc: "extracts linter directives", Run: directives, RunDespiteErrors: true, ResultType: reflect.TypeOf([]lint.Directive{}), }
View Source
var Generated = &analysis.Analyzer{ Name: "isgenerated", Doc: "annotate file names that have been code generated", Run: func(pass *analysis.Pass) (interface{}, error) { m := map[string]Generator{} for _, f := range pass.Files { path := pass.Fset.PositionFor(f.Pos(), false).Filename g, ok := isGenerated(path) if ok { m[path] = g } } return m, nil }, RunDespiteErrors: true, ResultType: reflect.TypeOf(map[string]Generator{}), }
View Source
var Purity = &analysis.Analyzer{ Name: "fact_purity", Doc: "Mark pure functions", Run: purity, Requires: []*analysis.Analyzer{buildir.Analyzer}, FactTypes: []analysis.Fact{(*IsPure)(nil)}, ResultType: reflect.TypeOf(PurityResult{}), }
View Source
var TokenFile = &analysis.Analyzer{ Name: "tokenfileanalyzer", Doc: "creates a mapping of *token.File to *ast.File", Run: func(pass *analysis.Pass) (interface{}, error) { m := map[*token.File]*ast.File{} for _, af := range pass.Files { tf := pass.Fset.File(af.Pos()) m[tf] = af } return m, nil }, RunDespiteErrors: true, ResultType: reflect.TypeOf(map[*token.File]*ast.File{}), }
Functions ¶
This section is empty.
Types ¶
type DeprecatedResult ¶
type DeprecatedResult struct { Objects map[types.Object]*IsDeprecated Packages map[*types.Package]*IsDeprecated }
type IsDeprecated ¶
type IsDeprecated struct{ Msg string }
func (*IsDeprecated) AFact ¶
func (*IsDeprecated) AFact()
func (*IsDeprecated) String ¶
func (d *IsDeprecated) String() string
type PurityResult ¶
Click to show internal directories.
Click to hide internal directories.