Documentation ¶
Overview ¶
Package scopelint privides a linter for scopes of variable in `for {}`.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type File ¶
type File struct { Package *Package ASTFile *ast.File FileSet *token.FileSet Source []byte Filename string CommentMap ast.CommentMap }
File represents a File being linted.
type Linter ¶
type Linter struct{}
A Linter lints Go source code.
type Node ¶
type Node struct { File DangerObjects map[*ast.Object]int UnsafeObjects map[*ast.Object]int SkipFuncs map[*ast.FuncLit]int Ignore bool }
Node represents a Node being linted.
type Package ¶
type Package struct { FileSet *token.FileSet Files map[string]*File TypesPackage *types.Package TypesInfo *types.Info Problems []Problem }
Package represents a package being linted.
type Problem ¶
type Problem struct { Position token.Position // position in source file Text string // the prose that describes the problem Link string // (optional) the link to the style guide for the problem Confidence float64 // a value in (0,1] estimating the confidence in this problem's correctness LineText string // the source line Category string // a short name for the general category of the problem // If the problem has a suggested fix (the minority case), // ReplacementLine is a full replacement for the relevant line of the source file. ReplacementLine string Ignored bool // marks ignored issue by nolint directive }
Problem represents a problem in some source code.
Click to show internal directories.
Click to hide internal directories.