Skip to content

Commit

Permalink
add new rules
Browse files Browse the repository at this point in the history
  • Loading branch information
ldez committed Jan 24, 2022
1 parent 7493672 commit 2bce462
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .golangci.example.yml
Expand Up @@ -1219,6 +1219,19 @@ linters-settings:
- name: waitgroup-by-value
severity: warning
disable: false
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#time-equal
- name: time-equal
severity: warning
disable: false
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#banned-characters
- name: banned-characters
severity: warning
disable: false
arguments: ["Ω","Σ","σ"]
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#optimize-operands-order
- name: optimize-operands-order
severity: warning
disable: false

rowserrcheck:
packages:
Expand Down
3 changes: 3 additions & 0 deletions pkg/golinters/revive.go
Expand Up @@ -305,6 +305,9 @@ var allRules = append([]lint.Rule{
&rule.NestedStructs{},
&rule.IfReturnRule{},
&rule.UselessBreak{},
&rule.TimeEqualRule{},
&rule.BannedCharsRule{},
&rule.OptimizeOperandsOrderRule{},
}, defaultRules...)

// This element is not exported by revive, so we need copy the code.
Expand Down

0 comments on commit 2bce462

Please sign in to comment.