|
4 | 4 | build-tags:
|
5 | 5 | - tools
|
6 | 6 | - e2e
|
7 |
| - skip-files: |
8 |
| - - "zz_generated.*\\.go$" |
9 |
| - - "vendored_openapi\\.go$" |
10 |
| - # We don't want to invest time to fix new linter findings in old API types. |
11 |
| - - "internal/apis/.*" |
12 | 7 | allow-parallel-runners: true
|
13 | 8 |
|
14 | 9 | linters:
|
15 | 10 | disable-all: true
|
16 | 11 | enable:
|
17 |
| - - asasalint |
18 |
| - - asciicheck |
19 |
| - - bidichk |
20 |
| - - bodyclose |
21 |
| - - containedctx |
22 |
| - - copyloopvar |
23 |
| - - dogsled |
24 |
| - - dupword |
25 |
| - - durationcheck |
26 |
| - - errcheck |
27 |
| - - errchkjson |
28 |
| - - gci |
29 |
| - - ginkgolinter |
30 |
| - - goconst |
31 |
| - - gocritic |
32 |
| - - godot |
33 |
| - - gofmt |
34 |
| - - goimports |
35 |
| - - goprintffuncname |
36 |
| - - gosec |
37 |
| - - gosimple |
38 |
| - - govet |
39 |
| - - importas |
40 |
| - - ineffassign |
41 |
| - - intrange |
42 |
| - - loggercheck |
43 |
| - - misspell |
44 |
| - - nakedret |
45 |
| - - nilerr |
46 |
| - - noctx |
47 |
| - - nolintlint |
48 |
| - - nosprintfhostport |
49 |
| - - prealloc |
50 |
| - - predeclared |
51 |
| - - revive |
52 |
| - - rowserrcheck |
53 |
| - - staticcheck |
54 |
| - - stylecheck |
55 |
| - - tenv |
56 |
| - - thelper |
57 |
| - - typecheck |
58 |
| - - unconvert |
59 |
| - - unparam |
60 |
| - - unused |
61 |
| - - usestdlibvars |
62 |
| - - whitespace |
| 12 | + - asasalint # warns about passing []any to func(...any) without expanding it |
| 13 | + - asciicheck # non ascii symbols |
| 14 | + - bidichk # dangerous unicode sequences |
| 15 | + - bodyclose # unclosed http bodies |
| 16 | + - containedctx # context.Context nested in a struct |
| 17 | + - copyloopvar # copying loop variables |
| 18 | + - dogsled # too many blank identifiers in assignments |
| 19 | + - dupword # duplicate words |
| 20 | + - durationcheck # multiplying two durations |
| 21 | + - errcheck # unchecked errors |
| 22 | + - errchkjson # invalid types passed to json encoder |
| 23 | + - gci # ensures imports are organized |
| 24 | + - ginkgolinter # ginkgo and gomega |
| 25 | + - goconst # strings that can be replaced by constants |
| 26 | + - gocritic # bugs, performance, style (we could add custom ones to this one) |
| 27 | + - godot # checks that comments end in a period |
| 28 | + - gofmt # warns about incorrect use of fmt functions |
| 29 | + - goimports # import formatting |
| 30 | + - goprintffuncname # printft-like functions should be named with f at the end |
| 31 | + - gosec # potential security problems |
| 32 | + - gosimple # simplify code |
| 33 | + - govet # basically 'go vet' |
| 34 | + - importas # consistent import aliases |
| 35 | + - ineffassign # ineffectual assignments |
| 36 | + - intrange # suggest using integer range in for loops |
| 37 | + - loggercheck # check for even key/value pairs in logger calls |
| 38 | + - misspell # spelling |
| 39 | + - nakedret # naked returns (named return parameters and an empty return) |
| 40 | + - nilerr # returning nil after checking err is not nil |
| 41 | + - noctx # http requests without context.Context |
| 42 | + - nolintlint # badly formatted nolint directives |
| 43 | + - nosprintfhostport # using sprintf to construct host:port in a URL |
| 44 | + - prealloc # suggest preallocating slices |
| 45 | + - predeclared # shadowing predeclared identifiers |
| 46 | + - revive # better version of golint |
| 47 | + - staticcheck # some of staticcheck's rules |
| 48 | + - stylecheck # another replacement for golint |
| 49 | + - tenv # using os.Setenv instead of t.Setenv in tests |
| 50 | + - thelper # test helpers not starting with t.Helper() |
| 51 | + - unconvert # unnecessary type conversions |
| 52 | + - unparam # unused function parameters |
| 53 | + - unused # unused constants, variables,functions, types |
| 54 | + - usestdlibvars # using variables/constants from the standard library |
| 55 | + - whitespace # unnecessary newlines |
63 | 56 |
|
64 | 57 | linters-settings:
|
65 | 58 | gci:
|
@@ -187,7 +180,6 @@ linters-settings:
|
187 | 180 | alias: infraexpv1
|
188 | 181 | nolintlint:
|
189 | 182 | allow-unused: false
|
190 |
| - allow-leading-space: false |
191 | 183 | require-specific: true
|
192 | 184 | revive:
|
193 | 185 | rules:
|
@@ -224,6 +216,12 @@ linters-settings:
|
224 | 216 | goconst:
|
225 | 217 | ignore-tests: true
|
226 | 218 | issues:
|
| 219 | + exclude-files: |
| 220 | + - "zz_generated.*\\.go$" |
| 221 | + - "vendored_openapi\\.go$" |
| 222 | + # We don't want to invest time to fix new linter findings in old API types. |
| 223 | + - "internal/apis/.*" |
| 224 | + |
227 | 225 | max-same-issues: 0
|
228 | 226 | max-issues-per-linter: 0
|
229 | 227 | # We are disabling default golangci exclusions because we want to help reviewers to focus on reviewing the most relevant
|
|
0 commit comments