Skip to content

Commit

Permalink
revive: allow to disable rule (golangci#2055)
Browse files Browse the repository at this point in the history
  • Loading branch information
ofw authored and SeigeC committed Apr 4, 2023
1 parent 4774a88 commit 1fd2209
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 1fd2209

Please sign in to comment.