|
1 | | -run: |
2 | | - timeout: 10m |
3 | | - |
| 1 | +version: "2" |
4 | 2 | linters: |
5 | | - disable-all: true |
| 3 | + default: none |
6 | 4 | enable: |
7 | 5 | - dupl |
8 | | - - gofmt |
9 | | - - goimports |
10 | | - - gosimple |
11 | 6 | - govet |
12 | 7 | - ineffassign |
13 | 8 | - misspell |
14 | 9 | - nakedret |
15 | 10 | - revive |
16 | | - - unused |
17 | 11 | - staticcheck |
18 | | - |
19 | | -linters-settings: |
20 | | - gofmt: |
21 | | - simplify: true |
22 | | - goimports: |
23 | | - local-prefixes: helm.sh/helm/v3 |
24 | | - dupl: |
25 | | - threshold: 400 |
26 | | -issues: |
27 | | - exclude-rules: |
28 | | - # Helm, and the Go source code itself, sometimes uses these names outside their built-in |
29 | | - # functions. As the Go source code has re-used these names it's ok for Helm to do the same. |
30 | | - # Linting will look for redefinition of built-in id's but we opt-in to the ones we choose to use. |
31 | | - - linters: |
32 | | - - revive |
33 | | - text: "redefines-builtin-id: redefinition of the built-in function append" |
34 | | - - linters: |
35 | | - - revive |
36 | | - text: "redefines-builtin-id: redefinition of the built-in function clear" |
37 | | - - linters: |
38 | | - - revive |
39 | | - text: "redefines-builtin-id: redefinition of the built-in function max" |
40 | | - - linters: |
41 | | - - revive |
42 | | - text: "redefines-builtin-id: redefinition of the built-in function min" |
43 | | - - linters: |
44 | | - - revive |
45 | | - text: "redefines-builtin-id: redefinition of the built-in function new" |
| 12 | + - unused |
| 13 | + settings: |
| 14 | + dupl: |
| 15 | + threshold: 400 |
| 16 | + staticcheck: |
| 17 | + # v1 config here separately enabled `gosimple` (S* checks) and `staticcheck` (SA* |
| 18 | + # checks) only — no `stylecheck` (ST*) or quickfix (QF*) groups. v2 merges all of |
| 19 | + # these into one `staticcheck` linter, so pin `checks` to just S*/SA* to preserve |
| 20 | + # the original lint policy instead of picking up ST*/QF* findings on old code. |
| 21 | + checks: |
| 22 | + - "SA*" |
| 23 | + - "S*" |
| 24 | + exclusions: |
| 25 | + rules: |
| 26 | + # Helm, and the Go source code itself, sometimes uses these names outside their built-in |
| 27 | + # functions. As the Go source code has re-used these names it's ok for Helm to do the same. |
| 28 | + # Linting will look for redefinition of built-in id's but we opt-in to the ones we choose to use. |
| 29 | + - linters: |
| 30 | + - revive |
| 31 | + text: 'redefines-builtin-id: redefinition of the built-in function append' |
| 32 | + - linters: |
| 33 | + - revive |
| 34 | + text: 'redefines-builtin-id: redefinition of the built-in function clear' |
| 35 | + - linters: |
| 36 | + - revive |
| 37 | + text: 'redefines-builtin-id: redefinition of the built-in function max' |
| 38 | + - linters: |
| 39 | + - revive |
| 40 | + text: 'redefines-builtin-id: redefinition of the built-in function min' |
| 41 | + - linters: |
| 42 | + - revive |
| 43 | + text: 'redefines-builtin-id: redefinition of the built-in function new' |
| 44 | + # golangci-lint v2.9.0 bundles a newer revive with a broader default rule set than |
| 45 | + # this branch's original v1.62 setup, which now also enables `exported`, |
| 46 | + # `package-comments`, `unexported-return`, and additional `var-naming` checks |
| 47 | + # (see the identical migration on HELM-813/820/821). Not part of this CVE fix's |
| 48 | + # scope — exclude rather than retrofitting doc comments/API changes onto unrelated code. |
| 49 | + - linters: |
| 50 | + - revive |
| 51 | + text: '^exported:' |
| 52 | + - linters: |
| 53 | + - revive |
| 54 | + text: '^package-comments:' |
| 55 | + - linters: |
| 56 | + - revive |
| 57 | + text: '^unexported-return:' |
| 58 | + - linters: |
| 59 | + - revive |
| 60 | + text: '^var-naming:' |
| 61 | +formatters: |
| 62 | + enable: |
| 63 | + - gofmt |
| 64 | + - goimports |
| 65 | + settings: |
| 66 | + gofmt: |
| 67 | + simplify: true |
| 68 | + goimports: |
| 69 | + local-prefixes: |
| 70 | + - helm.sh/helm/v3 |
0 commit comments