Skip to content

Commit

Permalink
revive: add enable-all-rules. (#2075)
Browse files Browse the repository at this point in the history
  • Loading branch information
ldez committed Jun 22, 2021
1 parent afb042b commit 9ce20f9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions pkg/config/linters_settings.go
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,7 @@ type ReviveSettings struct {
IgnoreGeneratedHeader bool `mapstructure:"ignore-generated-header"`
Confidence float64
Severity string
EnableAllRules bool `mapstructure:"enable-all-rules"`
Rules []struct {
Name string
Arguments []interface{}
Expand Down
3 changes: 2 additions & 1 deletion pkg/golinters/revive.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const reviveName = "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 {
Severity lint.Severity
lint.Failure `json:",inline"`
Expand Down Expand Up @@ -182,6 +182,7 @@ func createConfigMap(cfg *config.ReviveSettings) map[string]interface{} {
"severity": cfg.Severity,
"errorCode": cfg.ErrorCode,
"warningCode": cfg.WarningCode,
"enableAllRules": cfg.EnableAllRules,
}

rawDirectives := map[string]map[string]interface{}{}
Expand Down

0 comments on commit 9ce20f9

Please sign in to comment.