mirror of
https://codeberg.org/forgejo/forgejo
synced 2024-12-05 02:54:46 +01:00
4f63f283c4
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
32 lines
973 B
Go
Vendored
32 lines
973 B
Go
Vendored
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"`
|
|
}
|