1+ version : " 2"
12run :
2- allow-parallel-runners : true
33 tests : false
4-
5- # golangci-lint by default ignores some staticcheck and vet raised issues that
6- # are actually important to catch. The following ensures that we do not ignore
7- # those tools ever.
8- issues :
9- exclude-use-default : false
10-
11- # We opt out of all suggested linters and manually pick what we want.
12- # Please do not use enable-all.
4+ allow-parallel-runners : true
135linters :
14- disable-all : true
6+ # golangci-lint by default ignores some staticcheck and vet raised issues that
7+ # are actually important to catch. The following ensures that we do not ignore
8+ # those tools ever.
9+ default : none
10+ # We opt out of all suggested linters and manually pick what we want.
11+ # Please do not use enable-all.
1512 enable :
16- # Enabled by default linters:
17- - gosimple
18- - govet
19- - ineffassign
20- - staticcheck
21- - typecheck
22- - unused
23- # Disabled by default
2413 - asciicheck
2514 - bidichk
2615 - bodyclose
@@ -29,79 +18,94 @@ linters:
2918 - errname
3019 - errorlint
3120 - godot
32- - gofmt
33- - gofumpt
34- - goimports
3521 - goprintffuncname
22+ - govet
23+ - ineffassign
3624 - misspell
3725 - nilerr
3826 - noctx
3927 - nolintlint
4028 - revive
41- - usetesting
29+ - staticcheck
4230 - unconvert
31+ - unused
32+ - usetesting
4333 - wastedassign
4434 - whitespace
45-
46- linters-settings :
47- # We do not want to enforce every usage of fmt.Errorf to use %w.
48- errorlint :
49- errorf : false
50-
51- # If we want to opt out of a lint, we require an explanation.
52- nolintlint :
53- allow-unused : false
54- require-explanation : true
55- require-specific : true
56-
57- # Revive is yet another metalinter with a lot of useful lints.
58- # The below opts in to all the ones we would like to use.
59- revive :
60- ignore-generated-header : true
61- severity : warning
62- confidence : 0.6
63- rules :
64- - name : atomic
65- - name : blank-imports
66- - name : bool-literal-in-expr
67- - name : call-to-gc
68- - name : confusing-results
69- - name : constant-logical-expr
70- - name : context-as-argument
71- - name : context-keys-type
72- - name : defer
73- - name : dot-imports
74- - name : duplicated-imports
75- - name : early-return
76- - name : error-naming
77- - name : error-return
78- - name : error-strings
79- arguments :
80- - out.Die
81- - out.MaybeDie
82- - out.DieString
83- - out.MaybeDieString
84- - name : get-return
85- - name : identical-branches
86- - name : if-return
87- - name : modifies-value-receiver
88- - name : optimize-operands-order
89- - name : package-comments
90- disabled : true # disabling this in favor of https://github.com/redpanda-data/redpanda/issues/6340
91- - name : range
92- - name : range-val-in-closure
93- - name : receiver-naming
94- - name : string-of-int
95- - name : struct-tag
96- - name : superfluous-else
97- - name : time-equal
98- - name : time-naming
99- - name : unconditional-recursion
100- - name : unnecessary-stmt
101- - name : unreachable-code
102- - name : unused-parameter
103- - name : unused-receiver
104- - name : useless-break
105- - name : var-declaration
106- - name : var-naming
107- - name : waitgroup-by-value
35+ settings :
36+ errorlint :
37+ # We do not want to enforce every usage of fmt.Errorf to use %w.
38+ errorf : false
39+ nolintlint :
40+ # If we want to opt out of a lint, we require an explanation.
41+ require-explanation : true
42+ require-specific : true
43+ allow-unused : false
44+ # Revive is yet another metalinter with a lot of useful lints.
45+ # The below opts in to all the ones we would like to use.
46+ revive :
47+ confidence : 0.6
48+ severity : warning
49+ rules :
50+ - name : atomic
51+ - name : blank-imports
52+ - name : bool-literal-in-expr
53+ - name : call-to-gc
54+ - name : confusing-results
55+ - name : constant-logical-expr
56+ - name : context-as-argument
57+ - name : context-keys-type
58+ - name : defer
59+ - name : dot-imports
60+ - name : duplicated-imports
61+ - name : early-return
62+ - name : error-naming
63+ - name : error-return
64+ - name : error-strings
65+ exclude : ["Redpanda"]
66+ arguments :
67+ - out.Die
68+ - out.MaybeDie
69+ - out.DieString
70+ - out.MaybeDieString
71+ - name : get-return
72+ - name : identical-branches
73+ - name : if-return
74+ - name : modifies-value-receiver
75+ - name : optimize-operands-order
76+ - name : package-comments
77+ disabled : true
78+ - name : range
79+ - name : range-val-in-closure
80+ - name : receiver-naming
81+ - name : string-of-int
82+ - name : struct-tag
83+ - name : superfluous-else
84+ - name : time-equal
85+ - name : time-naming
86+ - name : unconditional-recursion
87+ - name : unnecessary-stmt
88+ - name : unreachable-code
89+ - name : unused-parameter
90+ - name : unused-receiver
91+ - name : useless-break
92+ - name : var-declaration
93+ - name : var-naming
94+ - name : waitgroup-by-value
95+ exclusions :
96+ generated : lax
97+ paths :
98+ - third_party$
99+ - builtin$
100+ - examples$
101+ formatters :
102+ enable :
103+ - gofmt
104+ - gofumpt
105+ - goimports
106+ exclusions :
107+ generated : lax
108+ paths :
109+ - third_party$
110+ - builtin$
111+ - examples$
0 commit comments