Documentation
¶
Overview ¶
Package api provides the plugin api to be implemented by linters and consumed by gomultilinter
Index ¶
Constants ¶
const ( // LinterFactorySymbolName is the name of the exported Symbol which provides // the entry point of a linter plugin LinterFactorySymbolName = "LinterFactory" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FileLinter ¶
type FileLinter interface { Linter LintFile(ctx context.Context, file *File, reporter IssueReporter) error }
FileLinter lints files
type IssueReporter ¶
IssueReporter collects resultig issues from the linters fields is a list of key-value-pairs to include in the log msg
type Linter ¶
type Linter interface {
Name() string
}
Linter base interface. concrete impls should implement Linter and one of the ...Linter interfaces below
type LinterConfig ¶
LinterConfig is the struct to which the config gets deserialized and which is used to construct new Linter instances
type LinterFactory ¶
type LinterFactory interface {
NewLinterConfig() LinterConfig
}
LinterFactory returns a pointer to a new LinterConfig
type Package ¶
type Package struct { PkgInfo *loader.PackageInfo FSet *token.FileSet }
Package represents a parsed go package
type PackageLinter ¶
type PackageLinter interface { Linter LintPackage(ctx context.Context, pkg *Package, reporter IssueReporter) error }
PackageLinter lints packages
type Severity ¶
type Severity int8
Severity of linter issue ENUM( Info, Warning, Error )
func ParseSeverity ¶
ParseSeverity attempts to convert a string to a Severity