| 1 |
version: "2" |
| 2 |
issues: |
| 3 |
max-same-issues: 0 |
| 4 |
|
| 5 |
linters: |
| 6 |
enable: |
| 7 |
- copyloopvar |
| 8 |
- depguard |
| 9 |
- durationcheck |
| 10 |
- errorlint |
| 11 |
- misspell |
| 12 |
- nolintlint |
| 13 |
- perfsprint |
| 14 |
- predeclared |
| 15 |
- revive |
| 16 |
- unconvert |
| 17 |
- usestdlibvars |
| 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: |
| 68 |
|
| 69 |
- name: unused-parameter |
| 70 |
severity: warning |
| 71 |
disabled: true |
| 72 |
|
| 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$ |