|
1 |
| ---- |
2 |
| -run: |
3 |
| - timeout: 5m |
4 |
| - |
5 |
| -output: |
6 |
| - sort-results: true |
| 1 | +version: "2" |
| 2 | +issues: |
| 3 | + max-same-issues: 0 |
7 | 4 |
|
8 | 5 | linters:
|
9 | 6 | enable:
|
10 | 7 | - copyloopvar
|
11 | 8 | - depguard
|
12 | 9 | - durationcheck
|
13 | 10 | - errorlint
|
14 |
| - # The linter 'exportloopref' is deprecated (since v1.60.2) due to: Since Go1.22 (loopvar) this linter is no longer relevant. Replaced by copyloopvar. |
15 |
| - # - exportloopref |
16 |
| - - gofmt |
17 |
| - - gofumpt |
18 |
| - - goimports |
19 |
| - - gosimple |
20 |
| - - ineffassign |
21 | 11 | - misspell
|
22 | 12 | - nolintlint
|
23 | 13 | - perfsprint
|
24 | 14 | - predeclared
|
25 | 15 | - revive
|
26 |
| - - staticcheck |
27 | 16 | - unconvert
|
28 |
| - - unused |
29 | 17 | - usestdlibvars
|
30 | 18 | - wastedassign
|
| 19 | + exclusions: |
| 20 | + generated: lax |
| 21 | + presets: |
| 22 | + - comments |
| 23 | + - common-false-positives |
| 24 | + - legacy |
| 25 | + - std-error-handling |
| 26 | + rules: |
| 27 | + - linters: |
| 28 | + - errcheck |
| 29 | + - govet |
| 30 | + - structcheck |
| 31 | + - nolintlint |
| 32 | + path: _test.go |
| 33 | + paths: |
| 34 | + - ^.*\.(pb|y)\.go$ |
| 35 | + - third_party$ |
| 36 | + - builtin$ |
| 37 | + - examples$ |
| 38 | + settings: |
| 39 | + depguard: |
| 40 | + rules: |
| 41 | + main: |
| 42 | + deny: |
| 43 | + - pkg: github.com/stretchr/testify/assert |
| 44 | + desc: Use github.com/stretchr/testify/require instead of github.com/stretchr/testify/assert |
| 45 | + - pkg: github.com/go-kit/kit/log |
| 46 | + desc: Use github.com/go-kit/log instead of github.com/go-kit/kit/log |
| 47 | + - pkg: io/ioutil |
| 48 | + desc: Use corresponding 'os' or 'io' functions instead. |
| 49 | + errcheck: |
| 50 | + exclude-functions: |
| 51 | + # The following 2 methods always return nil as the error |
| 52 | + - (*github.com/cespare/xxhash/v2.Digest).Write |
| 53 | + - (*github.com/cespare/xxhash/v2.Digest).WriteString |
| 54 | + - (*bufio.Writer).WriteRune |
| 55 | + perfsprint: |
| 56 | + # Optimizes even if it requires an int or uint type cast. |
| 57 | + int-conversion: true |
| 58 | + # Optimizes into `err.Error()` even if it is only equivalent for non-nil errors. |
| 59 | + err-error: true |
| 60 | + # Optimizes `fmt.Errorf`. |
| 61 | + errorf: true |
| 62 | + # Optimizes `fmt.Sprintf` with only one argument. |
| 63 | + sprintf1: true |
| 64 | + # Optimizes into strings concatenation. |
| 65 | + strconcat: true |
| 66 | + revive: |
| 67 | + rules: |
31 | 68 |
|
32 |
| -issues: |
33 |
| - max-same-issues: 0 |
34 |
| - exclude-rules: |
35 |
| - - path: _test.go |
36 |
| - linters: |
37 |
| - - errcheck |
38 |
| - - govet |
39 |
| - - structcheck |
40 |
| - # The configuration option `run.skip-files` is deprecated, please use `issues.exclude-files`. |
41 |
| - exclude-files: |
42 |
| - # Skip autogenerated files. |
43 |
| - - ^.*\.(pb|y)\.go$ |
| 69 | + - name: unused-parameter |
| 70 | + severity: warning |
| 71 | + disabled: true |
44 | 72 |
|
45 |
| -linters-settings: |
46 |
| - depguard: |
47 |
| - rules: |
48 |
| - main: |
49 |
| - deny: |
50 |
| - #- pkg: "sync/atomic" |
51 |
| - # desc: "Use go.uber.org/atomic instead of sync/atomic" |
52 |
| - - pkg: "github.com/stretchr/testify/assert" |
53 |
| - desc: "Use github.com/stretchr/testify/require instead of github.com/stretchr/testify/assert" |
54 |
| - - pkg: "github.com/go-kit/kit/log" |
55 |
| - desc: "Use github.com/go-kit/log instead of github.com/go-kit/kit/log" |
56 |
| - - pkg: "io/ioutil" |
57 |
| - desc: "Use corresponding 'os' or 'io' functions instead." |
58 |
| - #- pkg: "regexp" |
59 |
| - # desc: "Use github.com/grafana/regexp instead of regexp" |
60 |
| - errcheck: |
61 |
| - exclude-functions: |
62 |
| - # The following 2 methods always return nil as the error |
63 |
| - - (*github.com/cespare/xxhash/v2.Digest).Write |
64 |
| - - (*github.com/cespare/xxhash/v2.Digest).WriteString |
65 |
| - - (*bufio.Writer).WriteRune |
66 |
| - goimports: |
67 |
| - local-prefixes: github.com/prometheus/client_golang |
68 |
| - gofumpt: |
69 |
| - extra-rules: true |
70 |
| - perfsprint: |
71 |
| - # Optimizes even if it requires an int or uint type cast. |
72 |
| - int-conversion: true |
73 |
| - # Optimizes into `err.Error()` even if it is only equivalent for non-nil errors. |
74 |
| - err-error: true |
75 |
| - # Optimizes `fmt.Errorf`. |
76 |
| - errorf: true |
77 |
| - # Optimizes `fmt.Sprintf` with only one argument. |
78 |
| - sprintf1: true |
79 |
| - # Optimizes into strings concatenation. |
80 |
| - strconcat: true |
81 |
| - revive: |
82 |
| - rules: |
83 |
| - # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#unused-parameter |
84 |
| - - name: unused-parameter |
85 |
| - severity: warning |
86 |
| - disabled: true |
| 73 | +formatters: |
| 74 | + enable: |
| 75 | + - gofmt |
| 76 | + - gofumpt |
| 77 | + - goimports |
| 78 | + settings: |
| 79 | + gofumpt: |
| 80 | + extra-rules: true |
| 81 | + goimports: |
| 82 | + local-prefixes: |
| 83 | + - github.com/prometheus/client_golang |
| 84 | + exclusions: |
| 85 | + generated: lax |
| 86 | + paths: |
| 87 | + - ^.*\.(pb|y)\.go$ |
| 88 | + - third_party$ |
| 89 | + - builtin$ |
| 90 | + - examples$ |
0 commit comments