revive: add enable-all-rules. (#2075)
This commit is contained in:
parent
afb042badc
commit
9ce20f91d5
@ -376,6 +376,7 @@ type ReviveSettings struct {
|
|||||||
IgnoreGeneratedHeader bool `mapstructure:"ignore-generated-header"`
|
IgnoreGeneratedHeader bool `mapstructure:"ignore-generated-header"`
|
||||||
Confidence float64
|
Confidence float64
|
||||||
Severity string
|
Severity string
|
||||||
|
EnableAllRules bool `mapstructure:"enable-all-rules"`
|
||||||
Rules []struct {
|
Rules []struct {
|
||||||
Name string
|
Name string
|
||||||
Arguments []interface{}
|
Arguments []interface{}
|
||||||
|
@ -27,7 +27,7 @@ const reviveName = "revive"
|
|||||||
|
|
||||||
var reviveDebugf = logutils.Debug("revive")
|
var reviveDebugf = logutils.Debug("revive")
|
||||||
|
|
||||||
// jsonObject defines a JSON object of an failure
|
// jsonObject defines a JSON object of a failure
|
||||||
type jsonObject struct {
|
type jsonObject struct {
|
||||||
Severity lint.Severity
|
Severity lint.Severity
|
||||||
lint.Failure `json:",inline"`
|
lint.Failure `json:",inline"`
|
||||||
@ -182,6 +182,7 @@ func createConfigMap(cfg *config.ReviveSettings) map[string]interface{} {
|
|||||||
"severity": cfg.Severity,
|
"severity": cfg.Severity,
|
||||||
"errorCode": cfg.ErrorCode,
|
"errorCode": cfg.ErrorCode,
|
||||||
"warningCode": cfg.WarningCode,
|
"warningCode": cfg.WarningCode,
|
||||||
|
"enableAllRules": cfg.EnableAllRules,
|
||||||
}
|
}
|
||||||
|
|
||||||
rawDirectives := map[string]map[string]interface{}{}
|
rawDirectives := map[string]map[string]interface{}{}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user