Skip to content

Commit eed344f

Browse files
authored
revive: allow to disable rule (#2055)
1 parent 6a269af commit eed344f

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

pkg/config/linters_settings.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -380,6 +380,7 @@ type ReviveSettings struct {
380380
Name string
381381
Arguments []interface{}
382382
Severity string
383+
Disabled bool
383384
}
384385
ErrorCode int `mapstructure:"error-code"`
385386
WarningCode int `mapstructure:"warning-code"`

pkg/golinters/revive.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,7 @@ func createConfigMap(cfg *config.ReviveSettings) map[string]interface{} {
200200
rawRules[s.Name] = map[string]interface{}{
201201
"severity": s.Severity,
202202
"arguments": safeTomlSlice(s.Arguments),
203+
"disabled": s.Disabled,
203204
}
204205
}
205206

0 commit comments

Comments
 (0)