mirror of https://github.com/go-gitea/gitea
Git with a cup of tea, painless self-hosted git service
Mirror for internal git.with.parts use
https://git.with.parts
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
1.0 KiB
33 lines
1.0 KiB
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
|
|
|
|
// 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
|
|
|
|
// Config defines the config of the linter.
|
|
type Config struct {
|
|
IgnoreGeneratedHeader bool `toml:"ignoreGeneratedHeader"`
|
|
Confidence float64
|
|
Severity Severity
|
|
Rules RulesConfig `toml:"rule"`
|
|
ErrorCode int `toml:"errorCode"`
|
|
WarningCode int `toml:"warningCode"`
|
|
Directives DirectivesConfig `toml:"directive"`
|
|
Exclude []string `toml:"exclude"`
|
|
}
|
|
|