Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AllRuleNames ¶
AllRuleNames returns the canonical set of known rule names.
func ValidateRuleNames ¶
ValidateRuleNames checks that all names are known rules.
Types ¶
type Options ¶
type Options struct {
SpecRoot string
Rules []string // enabled rules; nil = all
Ignore []string // disabled rules
Severity string // minimum severity: error, warning, info
}
Options holds linting options.
type Violation ¶
type Violation struct {
File string `json:"file" yaml:"file"`
Line int `json:"line" yaml:"line"`
Severity string `json:"severity" yaml:"severity"`
Rule string `json:"rule" yaml:"rule"`
Message string `json:"message" yaml:"message"`
}
Violation represents a single linting violation.
func FilterBySeverity ¶
FilterBySeverity filters violations to those at or above the minimum severity.
Click to show internal directories.
Click to hide internal directories.