Versions in this module Expand all Collapse all v1 v1.3.1 Mar 7, 2024 Changes in this version + const SeverityError + const SeverityWarning + func Name(name string, whitelist, blacklist []string) (should string) + type AbstractRule struct + Failures []Failure + type Arguments = []interface + type Config struct + Confidence float64 + Directives DirectivesConfig + EnableAllRules bool + ErrorCode int + Exclude []string + IgnoreGeneratedHeader bool + Rules RulesConfig + Severity Severity + WarningCode int + type DirectiveConfig struct + Severity Severity + type DirectivesConfig = map[string]DirectiveConfig + type DisabledInterval struct + From token.Position + RuleName string + To token.Position + type Failure struct + Category string + Confidence float64 + Failure string + Node ast.Node + Position FailurePosition + ReplacementLine string + RuleName string + func (f *Failure) GetFilename() string + type FailurePosition struct + End token.Position + Start token.Position + func ToFailurePosition(start, end token.Pos, file *File) FailurePosition + type File struct + AST *ast.File + Name string + Pkg *Package + func NewFile(name string, content []byte, pkg *Package) (*File, error) + func (f *File) CommentMap() ast.CommentMap + func (f *File) Content() []byte + func (f *File) IsTest() bool + func (f *File) IsUntypedConst(expr ast.Expr) (defType string, ok bool) + func (f *File) Render(x interface{}) string + func (f *File) ToPosition(pos token.Pos) token.Position + type Formatter interface + Format func(<-chan Failure, Config) (string, error) + Name func() string + type FormatterMetadata struct + Description string + Name string + Sample string + type Linter struct + func New(reader ReadFile, maxOpenFiles int) Linter + func (l *Linter) Lint(packages [][]string, ruleSet []Rule, config Config) (<-chan Failure, error) + type Package struct + func (p *Package) Files() map[string]*File + func (p *Package) IsMain() bool + func (p *Package) Sortable() map[string]bool + func (p *Package) TypeCheck() error + func (p *Package) TypeOf(expr ast.Expr) types.Type + func (p *Package) TypesInfo() *types.Info + func (p *Package) TypesPkg() *types.Package + type ReadFile func(path string) (result []byte, err error) + type Rule interface + Apply func(*File, Arguments) []Failure + Name func() string + type RuleConfig struct + Arguments Arguments + Disabled bool + Severity Severity + type RulesConfig = map[string]RuleConfig + type Severity string