|
1 | | -linters-settings: |
2 | | - depguard: |
3 | | - list-type: denylist |
4 | | - packages: |
5 | | - # logging is allowed only by logutils.Log, logrus |
6 | | - # is allowed to use only in logutils package |
7 | | - - github.com/sirupsen/logrus |
8 | | - packages-with-error-message: |
9 | | - - github.com/sirupsen/logrus: "logging is allowed only by logutils.Log" |
10 | | - dupl: |
11 | | - threshold: 100 |
12 | | - funlen: |
13 | | - lines: 100 |
14 | | - statements: 50 |
15 | | - goconst: |
16 | | - min-len: 2 |
17 | | - min-occurrences: 3 |
18 | | - gocritic: |
19 | | - enabled-tags: |
20 | | - - diagnostic |
21 | | - - experimental |
22 | | - - opinionated |
23 | | - - performance |
24 | | - - style |
25 | | - disabled-checks: |
26 | | - - dupImport # https://github.com/go-critic/go-critic/issues/845 |
27 | | - - ifElseChain |
28 | | - - octalLiteral |
29 | | - - whyNoLint |
30 | | - gocyclo: |
31 | | - min-complexity: 15 |
32 | | - goimports: |
33 | | - local-prefixes: github.com/golangci/golangci-lint |
34 | | - gomnd: |
35 | | - # don't include the "operation" and "assign" |
36 | | - checks: |
37 | | - - argument |
38 | | - - case |
39 | | - - condition |
40 | | - - return |
41 | | - ignored-numbers: |
42 | | - - '0' |
43 | | - - '1' |
44 | | - - '2' |
45 | | - - '3' |
46 | | - ignored-functions: |
47 | | - - strings.SplitN |
48 | | - |
49 | | - govet: |
50 | | - check-shadowing: true |
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: 140 |
60 | | - misspell: |
61 | | - locale: US |
62 | | - nolintlint: |
63 | | - allow-unused: false # report any unused nolint directives |
64 | | - require-explanation: false # don't require an explanation for nolint directives |
65 | | - require-specific: false # don't require nolint directives to be specific about which linter is being skipped |
66 | | - |
| 1 | +version: "2" |
67 | 2 | linters: |
68 | | - disable-all: true |
| 3 | + default: none |
69 | 4 | enable: |
70 | 5 | - bodyclose |
71 | 6 | - depguard |
72 | 7 | - dogsled |
73 | 8 | - dupl |
74 | 9 | - errcheck |
75 | | - - exportloopref |
76 | 10 | - funlen |
77 | 11 | - gochecknoinits |
78 | 12 | - goconst |
79 | | - #- gocritic |
80 | 13 | - gocyclo |
81 | | - - gofmt |
82 | | - - goimports |
83 | | - - gomnd |
84 | 14 | - goprintffuncname |
85 | 15 | - gosec |
86 | | - - gosimple |
87 | 16 | - govet |
88 | 17 | - ineffassign |
89 | 18 | - lll |
90 | 19 | - misspell |
| 20 | + - mnd |
91 | 21 | - nakedret |
92 | 22 | - noctx |
93 | 23 | - nolintlint |
94 | 24 | - staticcheck |
95 | | - - stylecheck |
96 | | - - typecheck |
97 | 25 | - unconvert |
98 | 26 | - unparam |
99 | 27 | - unused |
100 | | - #- whitespace |
101 | | - |
102 | | - # don't enable: |
103 | | - # - asciicheck |
104 | | - # - scopelint |
105 | | - # - gochecknoglobals |
106 | | - # - gocognit |
107 | | - # - godot |
108 | | - # - godox |
109 | | - # - goerr113 |
110 | | - # - interfacer |
111 | | - # - maligned |
112 | | - # - nestif |
113 | | - # - prealloc |
114 | | - # - testpackage |
115 | | - # - revive |
116 | | - # - wsl |
117 | | - |
118 | | -issues: |
119 | | - # Excluding configuration per-path, per-linter, per-text and per-source |
120 | | - exclude-rules: |
121 | | - - path: _test\.go |
122 | | - linters: |
123 | | - - govet |
124 | | - |
125 | | -run: |
126 | | - timeout: 5m |
127 | | - skip-dirs: |
128 | | - - docs |
129 | | - - vendor |
| 28 | + settings: |
| 29 | + dupl: |
| 30 | + threshold: 100 |
| 31 | + funlen: |
| 32 | + lines: 100 |
| 33 | + statements: 50 |
| 34 | + goconst: |
| 35 | + min-len: 2 |
| 36 | + min-occurrences: 3 |
| 37 | + gocritic: |
| 38 | + disabled-checks: |
| 39 | + - dupImport |
| 40 | + - ifElseChain |
| 41 | + - octalLiteral |
| 42 | + - whyNoLint |
| 43 | + enabled-tags: |
| 44 | + - diagnostic |
| 45 | + - experimental |
| 46 | + - opinionated |
| 47 | + - performance |
| 48 | + - style |
| 49 | + gocyclo: |
| 50 | + min-complexity: 15 |
| 51 | + govet: |
| 52 | + settings: |
| 53 | + printf: |
| 54 | + funcs: |
| 55 | + - (github.com/golangci/golangci-lint/pkg/logutils.Log).Infof |
| 56 | + - (github.com/golangci/golangci-lint/pkg/logutils.Log).Warnf |
| 57 | + - (github.com/golangci/golangci-lint/pkg/logutils.Log).Errorf |
| 58 | + - (github.com/golangci/golangci-lint/pkg/logutils.Log).Fatalf |
| 59 | + lll: |
| 60 | + line-length: 140 |
| 61 | + misspell: |
| 62 | + locale: US |
| 63 | + nolintlint: |
| 64 | + require-explanation: false |
| 65 | + require-specific: false |
| 66 | + allow-unused: false |
| 67 | + exclusions: |
| 68 | + generated: lax |
| 69 | + presets: |
| 70 | + - comments |
| 71 | + - common-false-positives |
| 72 | + - legacy |
| 73 | + - std-error-handling |
| 74 | + rules: |
| 75 | + - linters: |
| 76 | + - govet |
| 77 | + path: _test\.go |
| 78 | + paths: |
| 79 | + - third_party$ |
| 80 | + - builtin$ |
| 81 | + - examples$ |
| 82 | +formatters: |
| 83 | + enable: |
| 84 | + - gofmt |
| 85 | + - goimports |
| 86 | + settings: |
| 87 | + goimports: |
| 88 | + local-prefixes: |
| 89 | + - github.com/golangci/golangci-lint |
| 90 | + exclusions: |
| 91 | + generated: lax |
| 92 | + paths: |
| 93 | + - third_party$ |
| 94 | + - builtin$ |
| 95 | + - examples$ |
0 commit comments