Documentation ¶
Overview ¶
Package lint provides the foundation for tools like staticcheck
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type FileIgnore ¶
func (*FileIgnore) Match ¶
func (fi *FileIgnore) Match(p Problem) bool
type GlobIgnore ¶
func (*GlobIgnore) Match ¶
func (gi *GlobIgnore) Match(p Problem) bool
type Job ¶
type Job struct { Program *Program // contains filtered or unexported fields }
func (*Job) Errorf ¶
func (j *Job) Errorf(n Positioner, format string, args ...interface{}) *Problem
func (*Job) NodePackage ¶
func (j *Job) NodePackage(node Positioner) *Pkg
type LineIgnore ¶
type LineIgnore struct { File string Line int Checks []string // contains filtered or unexported fields }
func (*LineIgnore) Match ¶
func (li *LineIgnore) Match(p Problem) bool
func (*LineIgnore) String ¶
func (li *LineIgnore) String() string
type Linter ¶
type Linter struct { Checkers []Checker Ignores []Ignore GoVersion int ReturnIgnored bool Config config.Config MaxConcurrentJobs int PrintStats bool // contains filtered or unexported fields }
A Linter lints Go source code.
type PerfStats ¶
type Positioner ¶
type Problem ¶
type Problem struct { Position token.Position // position in source file Text string // the prose that describes the problem Check string Checker string Package *Pkg Severity Severity }
Problem represents a problem in some source code.
Directories ¶
Path | Synopsis |
---|---|
Package lintdsl provides helpers for implementing static analysis checks.
|
Package lintdsl provides helpers for implementing static analysis checks. |
Package lintutil provides helpers for writing linter command lines.
|
Package lintutil provides helpers for writing linter command lines. |
format
Package format provides formatters for linter problems.
|
Package format provides formatters for linter problems. |
Package testutil provides helpers for testing staticcheck.
|
Package testutil provides helpers for testing staticcheck. |
Click to show internal directories.
Click to hide internal directories.