Skip to content

Commit

Permalink
revive: allow to disable rule (#2055)
Browse files Browse the repository at this point in the history
  • Loading branch information
ofw committed Jun 15, 2021
1 parent 6a269af commit eed344f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions pkg/config/linters_settings.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
Expand Down
1 change: 1 addition & 0 deletions pkg/golinters/revive.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}
}

Expand Down

0 comments on commit eed344f

Please sign in to comment.