2018-02-04 05:37:38 +02:00
|
|
|
package lint
|
|
|
|
|
|
|
|
// Arguments is type used for the arguments of a rule.
|
|
|
|
type Arguments = []interface{}
|
|
|
|
|
|
|
|
// RuleConfig is type used for the rule configuration.
|
|
|
|
type RuleConfig struct {
|
|
|
|
Arguments Arguments
|
|
|
|
Severity Severity
|
|
|
|
}
|
|
|
|
|
|
|
|
// RulesConfig defines the config for all rules.
|
|
|
|
type RulesConfig = map[string]RuleConfig
|
|
|
|
|
2019-08-02 17:21:33 +02:00
|
|
|
// DirectiveConfig is type used for the linter directive configuration.
|
|
|
|
type DirectiveConfig struct {
|
|
|
|
Severity Severity
|
|
|
|
}
|
|
|
|
|
|
|
|
// DirectivesConfig defines the config for all directives.
|
|
|
|
type DirectivesConfig = map[string]DirectiveConfig
|
|
|
|
|
2018-02-04 05:37:38 +02:00
|
|
|
// Config defines the config of the linter.
|
|
|
|
type Config struct {
|
|
|
|
IgnoreGeneratedHeader bool `toml:"ignoreGeneratedHeader"`
|
|
|
|
Confidence float64
|
|
|
|
Severity Severity
|
2019-08-02 17:21:33 +02:00
|
|
|
Rules RulesConfig `toml:"rule"`
|
|
|
|
ErrorCode int `toml:"errorCode"`
|
|
|
|
WarningCode int `toml:"warningCode"`
|
|
|
|
Directives DirectivesConfig `toml:"directive"`
|
2021-03-21 00:43:44 +02:00
|
|
|
Exclude []string `toml:"exclude"`
|
2018-02-04 05:37:38 +02:00
|
|
|
}
|