Documentation ¶
Index ¶
Constants ¶
View Source
const ( ConsoleOutput = "console" JSONOutput = "json" GithubOutput = "github" ErrorLevel = "error" WarningLevel = "warning" InfoLevel = "info" )
Variables ¶
This section is empty.
Functions ¶
func ApplyModInfo ¶ added in v0.9.0
ApplyModInfo add the the mod info to all analyzers are in need of such info
func GenerateConfig ¶
func GenerateConfig()
Types ¶
type Config ¶
type Config struct { Analyzers map[string]map[string]string `json:"analyzers" yaml:"analyzers"` Module string `json:"module" yaml:"module"` Debug string `json:"debug" yaml:"debug"` CPUProfile string `json:"cpuprofile" yaml:"cpuprofile"` MemProfile string `json:"memprofile" yaml:"memprofile"` Trace string `json:"trace" yaml:"trace"` Output string `json:"output" yaml:"output"` GoVersion string `json:"go_version" yaml:"go_version"` Args []string `json:"-" yaml:"-"` Severity []*SeverityRule `json:"severity" yaml:"severity"` Exclude []*Rule `json:"exclude" yaml:"exclude"` Test bool `json:"test" yaml:"test"` Fix bool `json:"fix" yaml:"fix"` }
func ParseConfig ¶
func ParseConfig() *Config
type ModInfo ¶ added in v0.9.0
ModInfo contains the version of go and module name
func GetModInfo ¶ added in v0.9.0
GetModInfo returns the base info about module name and go version TODO: support path in case of monorepo
type Rule ¶ added in v0.8.0
type Rule struct { PackageRE *regexp.Regexp `json:"-" yaml:"-"` PathRE *regexp.Regexp `json:"-" yaml:"-"` MessageRE *regexp.Regexp `json:"-" yaml:"-"` Package string `json:"package" yaml:"package"` Analyzer string `json:"analyzer" yaml:"analyzer"` Path string `json:"path" yaml:"path"` Message string `json:"message" yaml:"message"` Severity string `json:"severity" yaml:"severity"` GitRef string `json:"git_ref" yaml:"git_ref"` }
type SeverityRule ¶ added in v0.8.0
Click to show internal directories.
Click to hide internal directories.