Skip to content

Commit 937ae2d

Browse files
ccoVeillesagikazarmark
authored andcommitted
ci: enable revive rules
These are the exact default rules, only packages-comment rule was disabled. But we had to add them all to disable one rule. For records, revive owns a lot of rules that could be enabled.
1 parent 2959599 commit 937ae2d

File tree

1 file changed

+32
-1
lines changed

1 file changed

+32
-1
lines changed

.golangci.yaml

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,41 @@ linters:
8282
- noctx
8383
path: _test.go
8484
presets:
85-
- comments
8685
- std-error-handling
8786

8887
settings:
88+
revive:
89+
rules:
90+
- name: blank-imports
91+
- name: context-as-argument
92+
arguments:
93+
- allowTypesBefore: "*testing.T"
94+
- name: context-keys-type
95+
- name: dot-imports
96+
- name: empty-block
97+
- name: error-naming
98+
- name: error-return
99+
- name: error-strings
100+
- name: errorf
101+
- name: exported
102+
arguments:
103+
- "sayRepetitiveInsteadOfStutters" # make error messages clearer
104+
- name: increment-decrement
105+
- name: indent-error-flow
106+
- name: package-comments
107+
disabled: true # disable package comments rule for now
108+
- name: range
109+
- name: redefines-builtin-id
110+
- name: superfluous-else
111+
- name: time-naming
112+
- name: unexported-return
113+
- name: unreachable-code
114+
- name: unused-parameter
115+
- name: var-declaration
116+
- name: var-naming
117+
118+
# TODO: add more revive rules
119+
89120
misspell:
90121
locale: US
91122
nolintlint:

0 commit comments

Comments
 (0)