Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildDefaultAnalyzers ¶
BuildDefaultAnalyzers returns the default list of analyzers
Types ¶
type AnalyzerBuilder ¶ added in v2.21.0
AnalyzerBuilder is used to register an analyzer definition with the analyzer
type AnalyzerDefinition ¶ added in v2.21.0
type AnalyzerDefinition struct {
ID string
Description string
Create AnalyzerBuilder
}
AnalyzerDefinition contains the description of an analyzer and a mechanism to create it.
type AnalyzerFilter ¶ added in v2.21.0
AnalyzerFilter can be used to include or exclude an analyzer depending on the return value of the function
func NewAnalyzerFilter ¶ added in v2.21.0
func NewAnalyzerFilter(action bool, analyzerIDs ...string) AnalyzerFilter
NewAnalyzerFilter is a closure that will include/exclude the analyzer ID's based on the supplied boolean value.
type AnalyzerList ¶ added in v2.21.0
type AnalyzerList struct {
Analyzers map[string]AnalyzerDefinition
AnalyzerSuppressed map[string]bool
}
AnalyzerList contains a mapping of analyzer ID's to analyzer definitions and a mapping of analyzer ID's to whether analyzers are suppressed.
func Generate ¶ added in v2.21.0
func Generate(trackSuppressions bool, filters ...AnalyzerFilter) *AnalyzerList
Generate the list of analyzers to use
func (*AnalyzerList) AnalyzersInfo ¶ added in v2.21.0
func (al *AnalyzerList) AnalyzersInfo() (map[string]AnalyzerDefinition, map[string]bool)
AnalyzersInfo returns all the create methods and the analyzer suppressed map for a given list
type AnalyzerSet ¶ added in v2.21.0
func NewAnalyzerSet ¶ added in v2.21.0
func NewAnalyzerSet() *AnalyzerSet
NewAnalyzerSet constructs a new AnalyzerSet
func (*AnalyzerSet) IsSuppressed ¶ added in v2.21.0
func (a *AnalyzerSet) IsSuppressed(ruleID string) bool
IsSuppressed will return whether the Analyzer is suppressed.