Documentation ¶
Overview ¶
Package goanalysis defines the implementation of the checker commands. The same code drives the multi-analysis driver, the single-analysis driver that is conventionally provided for convenience along with each analysis package, and the test driver.
Index ¶
- Constants
- Variables
- func MakeFakeLoaderProgram(pass *analysis.Pass) *loader.Program
- type Diagnostic
- type EncodingIssue
- type Fact
- type FailedPrerequisitesError
- type IllTypedError
- type Issue
- type Linter
- func (lnt *Linter) Desc() string
- func (lnt *Linter) LoadMode() LoadMode
- func (lnt *Linter) Name() string
- func (lnt *Linter) Run(ctx context.Context, lintCtx *linter.Context) ([]result.Issue, error)
- func (lnt *Linter) SetTypecheckMode()
- func (lnt *Linter) UseOriginalPackages()
- func (lnt *Linter) WithContextSetter(cs func(*linter.Context)) *Linter
- func (lnt *Linter) WithIssuesReporter(r func(*linter.Context) []Issue) *Linter
- func (lnt *Linter) WithLoadMode(loadMode LoadMode) *Linter
- type LoadMode
- type MetaLinter
Constants ¶
View Source
const ( TheOnlyAnalyzerName = "the_only_name" TheOnlyanalyzerDoc = "the_only_doc" )
Variables ¶
View Source
var (
Debug = os.Getenv("GL_GOANALYSIS_DEBUG")
)
Functions ¶
Types ¶
type Diagnostic ¶ added in v1.19.0
type EncodingIssue ¶ added in v1.21.0
type FailedPrerequisitesError ¶ added in v1.24.0
type FailedPrerequisitesError struct {
// contains filtered or unexported fields
}
func (*FailedPrerequisitesError) Consume ¶ added in v1.24.0
func (f *FailedPrerequisitesError) Consume(name string, err error)
func (FailedPrerequisitesError) Error ¶ added in v1.24.0
func (f FailedPrerequisitesError) Error() string
func (FailedPrerequisitesError) NotEmpty ¶ added in v1.24.0
func (f FailedPrerequisitesError) NotEmpty() bool
type IllTypedError ¶ added in v1.20.0
func (*IllTypedError) Error ¶ added in v1.20.0
func (e *IllTypedError) Error() string
type Linter ¶
type Linter struct {
// contains filtered or unexported fields
}
func (*Linter) SetTypecheckMode ¶ added in v1.20.0
func (lnt *Linter) SetTypecheckMode()
func (*Linter) UseOriginalPackages ¶ added in v1.20.0
func (lnt *Linter) UseOriginalPackages()
func (*Linter) WithContextSetter ¶ added in v1.20.0
func (*Linter) WithIssuesReporter ¶ added in v1.20.0
func (*Linter) WithLoadMode ¶ added in v1.20.0
type MetaLinter ¶ added in v1.19.0
type MetaLinter struct {
// contains filtered or unexported fields
}
func NewMetaLinter ¶ added in v1.19.0
func NewMetaLinter(linters []*Linter) *MetaLinter
func (MetaLinter) Desc ¶ added in v1.19.0
func (ml MetaLinter) Desc() string
func (MetaLinter) Name ¶ added in v1.19.0
func (ml MetaLinter) Name() string
Click to show internal directories.
Click to hide internal directories.