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