Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var BlacklistRule = Rule{ Name: "blacklist", Terms: []string{"blacklist", "black-list"}, Alternatives: []string{"blocklist"}, Severity: SevWarn, }
BlacklistRule is the default rule for blacklist
View Source
var DefaultRules = []*Rule{ &WhitelistRule, &BlacklistRule, }
DefaultRules are the default rules always used
View Source
var WhitelistRule = Rule{ Name: "whitelist", Terms: []string{"whitelist", "white-list"}, Alternatives: []string{"allowlist"}, Severity: SevWarn, }
WhitelistRule is the default rule for whitelist
Functions ¶
This section is empty.
Types ¶
type Rule ¶
type Rule struct { Name string `yaml:"name"` Terms []string `yaml:"terms"` Alternatives []string `yaml:"alternatives"` Note string `yaml:"note"` Severity Severity `yaml:"severity"` // contains filtered or unexported fields }
Rule is a linter rule
func (*Rule) FindAllStringIndex ¶ added in v0.1.4
func (*Rule) ReasonWithNote ¶ added in v0.1.4
Reason returns a human-readable reason for the rule violation with an additional note, if defined.
type Severity ¶
type Severity int
Severity is a log severity
func (*Severity) UnmarshalYAML ¶ added in v0.1.4
UnmarshalYAML to unmarshal severity string
Click to show internal directories.
Click to hide internal directories.