Skip to content

Commit 9ce20f9

Browse files
authored
revive: add enable-all-rules. (#2075)
1 parent afb042b commit 9ce20f9

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

pkg/config/linters_settings.go

+1
Original file line numberDiff line numberDiff line change
@@ -376,6 +376,7 @@ type ReviveSettings struct {
376376
IgnoreGeneratedHeader bool `mapstructure:"ignore-generated-header"`
377377
Confidence float64
378378
Severity string
379+
EnableAllRules bool `mapstructure:"enable-all-rules"`
379380
Rules []struct {
380381
Name string
381382
Arguments []interface{}

pkg/golinters/revive.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ const reviveName = "revive"
2727

2828
var reviveDebugf = logutils.Debug("revive")
2929

30-
// jsonObject defines a JSON object of an failure
30+
// jsonObject defines a JSON object of a failure
3131
type jsonObject struct {
3232
Severity lint.Severity
3333
lint.Failure `json:",inline"`
@@ -182,6 +182,7 @@ func createConfigMap(cfg *config.ReviveSettings) map[string]interface{} {
182182
"severity": cfg.Severity,
183183
"errorCode": cfg.ErrorCode,
184184
"warningCode": cfg.WarningCode,
185+
"enableAllRules": cfg.EnableAllRules,
185186
}
186187

187188
rawDirectives := map[string]map[string]interface{}{}

0 commit comments

Comments
 (0)