revive: allow to disable rule (#2055)
This commit is contained in:
parent
6a269af7a6
commit
eed344f619
pkg
@ -380,6 +380,7 @@ type ReviveSettings struct {
|
||||
Name string
|
||||
Arguments []interface{}
|
||||
Severity string
|
||||
Disabled bool
|
||||
}
|
||||
ErrorCode int `mapstructure:"error-code"`
|
||||
WarningCode int `mapstructure:"warning-code"`
|
||||
|
@ -200,6 +200,7 @@ func createConfigMap(cfg *config.ReviveSettings) map[string]interface{} {
|
||||
rawRules[s.Name] = map[string]interface{}{
|
||||
"severity": s.Severity,
|
||||
"arguments": safeTomlSlice(s.Arguments),
|
||||
"disabled": s.Disabled,
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user