Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var IgnoreTestLinterData = true
IgnoreTestLinterData skips over unit tests
Functions ¶
Types ¶
type Allowlist ¶
type Allowlist struct {
// contains filtered or unexported fields
}
Allowlist determines if rules are allowlisted for the given paths.
func NewAllowlist ¶
NewAllowlist creates and returns an Allowlist object.
type FileVisitor ¶
type FileVisitor struct {
// contains filtered or unexported fields
}
FileVisitor visits the go file syntax tree and applies the given rules.
type Report ¶
type Report struct {
// contains filtered or unexported fields
}
Report populates lint report.
func NewLintReport ¶
func NewLintReport() *Report
NewLintReport creates and returns a Report object.
type Rule ¶
type Rule interface { // GetID returns ID of the rule in string, ID is equal to the file name of that rule. GetID() string // Check verifies if aNode passes rule check. If verification fails lrp creates a report. Check(aNode ast.Node, fs *token.FileSet, lrp *Report) }
Rule is interface for defining lint rules.
Click to show internal directories.
Click to hide internal directories.