|
1 |
| -linters-settings: |
2 |
| - dupl: |
3 |
| - threshold: 100 |
4 |
| - funlen: |
5 |
| - lines: 50 |
6 |
| - statements: 25 |
7 |
| - goconst: |
8 |
| - min-len: 4 |
9 |
| - min-occurrences: 2 |
10 |
| - gocritic: |
11 |
| - enabled-tags: |
12 |
| - - diagnostic |
13 |
| - - experimental |
14 |
| - - opinionated |
15 |
| - - performance |
16 |
| - - style |
17 |
| - disabled-checks: |
18 |
| - - whyNoLint |
19 |
| - gocyclo: |
20 |
| - min-complexity: 15 |
21 |
| - govet: |
22 |
| - settings: |
23 |
| - printf: |
24 |
| - funcs: |
25 |
| - - (github.com/golangci/golangci-lint/pkg/logutils.Log).Infof |
26 |
| - - (github.com/golangci/golangci-lint/pkg/logutils.Log).Warnf |
27 |
| - - (github.com/golangci/golangci-lint/pkg/logutils.Log).Errorf |
28 |
| - - (github.com/golangci/golangci-lint/pkg/logutils.Log).Fatalf |
29 |
| - lll: |
30 |
| - line-length: 250 |
31 |
| - nolintlint: |
32 |
| - allow-unused: false # report any unused nolint directives |
33 |
| - require-explanation: false # do not require an explanation for nolint directives |
34 |
| - require-specific: true # require nolint directives to be specific about which linter is being skipped |
| 1 | +version: "2" |
35 | 2 | linters:
|
36 |
| - # please, do not use `enable-all`: it's deprecated and will be removed soon. |
37 |
| - # inverted configuration with `enable-all` and `disable` is not scalable during updates of golangci-lint |
38 |
| - disable-all: true |
| 3 | + default: none |
39 | 4 | enable:
|
40 | 5 | - bodyclose
|
| 6 | + - copyloopvar |
41 | 7 | - dogsled
|
42 | 8 | - errcheck
|
43 | 9 | - exhaustive
|
44 |
| - - copyloopvar |
45 | 10 | - funlen
|
46 | 11 | - goconst
|
47 | 12 | - gocritic
|
48 | 13 | - gocyclo
|
49 |
| - - gofmt |
50 |
| - - goimports |
51 |
| - - mnd |
52 | 14 | - goprintffuncname
|
53 | 15 | - gosec
|
54 |
| - - gosimple |
55 | 16 | - govet
|
56 | 17 | - ineffassign
|
57 | 18 | - lll
|
58 | 19 | - misspell
|
| 20 | + - mnd |
59 | 21 | - nakedret
|
60 | 22 | - nolintlint
|
61 | 23 | - revive
|
62 | 24 | - rowserrcheck
|
63 | 25 | - staticcheck
|
64 |
| - - stylecheck |
65 |
| - - typecheck |
66 | 26 | - unconvert
|
67 | 27 | - unparam
|
68 | 28 | - unused
|
69 | 29 | - whitespace
|
70 |
| - # do not enable: |
71 |
| - # - asciicheck |
72 |
| - # - depguard |
73 |
| - # - dupl |
74 |
| - # - gochecknoglobals |
75 |
| - # - gochecknoinits |
76 |
| - # - gocognit |
77 |
| - # - godot |
78 |
| - # - godox |
79 |
| - # - goerr113 |
80 |
| - # - maligned |
81 |
| - # - nestif |
82 |
| - # - noctx |
83 |
| - # - prealloc |
84 |
| - # - copyloopvar |
85 |
| - # - structcheck |
86 |
| - # - testpackage |
87 |
| - # - wsl |
88 |
| -issues: |
89 |
| - # Excluding configuration per-path, per-linter, per-text and per-source |
90 |
| - exclude-rules: |
91 |
| - # Ignore magic numbers, inline strings and function length in tests. |
92 |
| - - path: _test\.go |
93 |
| - linters: |
94 |
| - - mnd |
95 |
| - - goconst |
96 |
| - - funlen |
97 |
| - # Ignore line length for string assignments (do not try and wrap regex definitions) |
98 |
| - - linters: |
99 |
| - - lll |
100 |
| - source: "^(.*= (\".*\"|`.*`))$" |
101 |
| - # https://github.com/go-critic/go-critic/issues/926 |
102 |
| - - linters: |
103 |
| - - gocritic |
104 |
| - text: "unnecessaryDefer:" |
105 |
| - # Ignore static strings in tests |
| 30 | + settings: |
| 31 | + dupl: |
| 32 | + threshold: 100 |
| 33 | + funlen: |
| 34 | + lines: 50 |
| 35 | + statements: 25 |
| 36 | + goconst: |
| 37 | + min-len: 4 |
| 38 | + min-occurrences: 2 |
| 39 | + gocritic: |
| 40 | + disabled-checks: |
| 41 | + - whyNoLint |
| 42 | + enabled-tags: |
| 43 | + - diagnostic |
| 44 | + - experimental |
| 45 | + - opinionated |
| 46 | + - performance |
| 47 | + - style |
| 48 | + gocyclo: |
| 49 | + min-complexity: 15 |
| 50 | + govet: |
| 51 | + settings: |
| 52 | + printf: |
| 53 | + funcs: |
| 54 | + - (github.com/golangci/golangci-lint/pkg/logutils.Log).Infof |
| 55 | + - (github.com/golangci/golangci-lint/pkg/logutils.Log).Warnf |
| 56 | + - (github.com/golangci/golangci-lint/pkg/logutils.Log).Errorf |
| 57 | + - (github.com/golangci/golangci-lint/pkg/logutils.Log).Fatalf |
| 58 | + lll: |
| 59 | + line-length: 250 |
| 60 | + nolintlint: |
| 61 | + require-explanation: false |
| 62 | + require-specific: true |
| 63 | + allow-unused: false |
| 64 | + exclusions: |
| 65 | + generated: lax |
| 66 | + presets: |
| 67 | + - comments |
| 68 | + - common-false-positives |
| 69 | + - legacy |
| 70 | + - std-error-handling |
| 71 | + rules: |
| 72 | + - linters: |
| 73 | + - funlen |
| 74 | + - goconst |
| 75 | + - mnd |
| 76 | + path: _test\.go |
| 77 | + - linters: |
| 78 | + - lll |
| 79 | + source: ^(.*= (".*"|`.*`))$ |
| 80 | + - linters: |
| 81 | + - gocritic |
| 82 | + text: 'unnecessaryDefer:' |
| 83 | + paths: |
| 84 | + - third_party$ |
| 85 | + - builtin$ |
| 86 | + - examples$ |
| 87 | +formatters: |
| 88 | + enable: |
| 89 | + - gofmt |
| 90 | + - goimports |
| 91 | + exclusions: |
| 92 | + generated: lax |
| 93 | + paths: |
| 94 | + - third_party$ |
| 95 | + - builtin$ |
| 96 | + - examples$ |
0 commit comments