|
| 1 | +version: "2" |
| 2 | + |
1 | 3 | run:
|
2 | 4 | timeout: 10m
|
3 | 5 | issues-exit-code: 1
|
4 | 6 | tests: false
|
5 | 7 |
|
6 | 8 | linters:
|
7 |
| - # please, do not use `enable-all`: it's deprecated and will be removed soon. |
8 |
| - # inverted configuration with `enable-all` and `disable` is not scalable during updates of golangci-lint |
9 |
| - disable-all: true |
10 | 9 | enable:
|
11 | 10 | - bodyclose
|
12 |
| - # - depguard # We don't want to use this anymore |
13 | 11 | - dogsled
|
14 |
| - # - dupl # Reactivate when we want to ensure there is no code duplication |
15 | 12 | - errcheck
|
16 | 13 | - funlen
|
17 | 14 | - gocyclo
|
18 | 15 | - gocritic
|
19 |
| - - gofmt |
20 |
| - - goimports |
21 | 16 | - goprintffuncname
|
22 | 17 | - gosec
|
23 |
| - - gosimple |
24 | 18 | - govet
|
25 | 19 | - ineffassign
|
26 | 20 | - misspell
|
27 | 21 | - nakedret
|
28 |
| - # - rowserrcheck # Does not support generics yet (see https://github.com/golangci/golangci-lint/issues/2649) |
29 |
| - # - copyloopvar |
30 | 22 | - staticcheck
|
31 |
| - - typecheck |
32 | 23 | - unconvert
|
33 | 24 | - unparam
|
34 | 25 | - unused
|
35 | 26 | - gocognit
|
36 | 27 | - nolintlint
|
37 |
| - # - revive # Reactivate when we want everything to be documented |
38 | 28 | - godot
|
39 | 29 | - promlinter
|
40 | 30 | - whitespace
|
41 | 31 | - dupword
|
42 | 32 | - predeclared
|
| 33 | + disable: |
| 34 | + - errcheck |
43 | 35 |
|
44 |
| - # - gochecknoglobals |
45 |
| - # - gochecknoinits |
46 |
| - |
47 |
| - # - fieldalignment # Not packaged yet ? |
48 |
| - |
49 |
| - # - maligned # Deprecated |
50 |
| - # - interfacer |
51 |
| - # - goerr113 |
52 |
| - # - errorlint |
53 |
| - # - contextcheck |
54 |
| - # - wrapcheck |
55 |
| - # - varnamelen |
56 |
| - |
57 |
| - # - durationcheck |
58 |
| - # - errname |
59 |
| - # - exhaustive |
60 |
| - # - makezero |
61 |
| - # - nilerr |
62 |
| - # - noctx |
63 |
| - # - paralleltest |
64 |
| - |
65 |
| - # - wsl |
66 |
| - # - nlreturn |
67 |
| - # - ireturn |
68 |
| - # - gomnd |
69 |
| - # - forcetypeassert |
70 |
| - # - exhaustivestruct |
71 |
| - # - cyclop |
72 |
| - # - nestif |
73 |
| - # - lll |
74 |
| - # - godox |
75 |
| - # - gofumpt |
76 |
| - |
77 |
| -output: |
78 |
| - formats: |
79 |
| - - format: colored-line-number |
80 |
| - print-issued-lines: true |
81 |
| - print-linter-name: true |
82 |
| - |
83 |
| -linters-settings: |
84 |
| - errcheck: |
85 |
| - # report about not checking of errors in type assetions: `a := b.(MyStruct)`; |
86 |
| - # default is false: such cases aren't reported by default. |
87 |
| - check-type-assertions: false |
88 |
| - |
89 |
| - # report about assignment of errors to blank identifier: `num, _ := strconv.Atoi(numStr)`; |
90 |
| - # default is false: such cases aren't reported by default. |
91 |
| - check-blank: false |
92 |
| - # govet: |
93 |
| - # report about shadowed variables |
94 |
| - #TODO# check-shadowing: true |
95 |
| - gocognit: |
96 |
| - min-complexity: 30 |
97 |
| - funlen: |
98 |
| - lines: 110 |
99 |
| - statements: 60 |
100 |
| - gofmt: |
101 |
| - simplify: true |
102 |
| - gocyclo: |
103 |
| - min-complexity: 20 |
104 |
| - # maligned: # Deprecated |
105 |
| - # suggest-new: true |
106 |
| - dupl: |
107 |
| - threshold: 150 |
108 |
| - misspell: |
109 |
| - locale: US |
110 |
| - lll: |
111 |
| - line-length: 140 |
112 |
| - tab-width: 1 |
113 |
| - # unused: |
114 |
| - unparam: |
115 |
| - # Inspect exported functions, default is false. Set to true if no external program/library imports your code. |
116 |
| - # XXX: if you enable this setting, unparam will report a lot of false-positives in text editors: |
117 |
| - # if it's called for subdir of a project it can't find external interfaces. All text editor integrations |
118 |
| - # with golangci-lint call it on a directory with the changed file. |
119 |
| - check-exported: false |
120 |
| - nakedret: |
121 |
| - # make an issue if func has more lines of code than this setting and it has naked returns; default is 30 |
122 |
| - max-func-lines: 30 |
123 |
| - prealloc: |
124 |
| - # Report preallocation suggestions only on simple loops that have no returns/breaks/continues/gotos in them. |
125 |
| - # True by default. |
126 |
| - simple: true |
127 |
| - range-loops: true # Report preallocation suggestions on range loops, true by default |
128 |
| - for-loops: true # Report preallocation suggestions on for loops, false by default |
129 |
| - gocritic: |
130 |
| - enabled-tags: |
131 |
| - - performance |
132 |
| - - diagnostic |
133 |
| - - style |
134 |
| - disabled-checks: |
135 |
| - - hugeParam |
136 |
| - - importShadow |
137 |
| - - ifElseChain |
138 |
| - - commentedOutCode |
139 |
| - nolintlint: |
140 |
| - require-explanation: true |
141 |
| - require-specific: true |
| 36 | + settings: |
| 37 | + errcheck: |
| 38 | + check-type-assertions: false |
| 39 | + check-blank: false |
| 40 | + gocognit: |
| 41 | + min-complexity: 30 |
| 42 | + funlen: |
| 43 | + lines: 110 |
| 44 | + statements: 60 |
| 45 | + gocyclo: |
| 46 | + min-complexity: 20 |
| 47 | + gocritic: |
| 48 | + enabled-tags: |
| 49 | + - performance |
| 50 | + - diagnostic |
| 51 | + - style |
| 52 | + disabled-checks: |
| 53 | + - hugeParam |
| 54 | + - importShadow |
| 55 | + - ifElseChain |
| 56 | + - commentedOutCode |
| 57 | + nolintlint: |
| 58 | + require-explanation: true |
| 59 | + require-specific: true |
142 | 60 |
|
143 | 61 | issues:
|
144 | 62 | max-issues-per-linter: 0
|
145 | 63 | max-same-issues: 0
|
146 |
| - exclude-files: |
147 |
| - - ".*\\.pb\\.go$" |
148 |
| - - ".*\\.gen\\.go$" |
149 |
| - - ".*_gen\\.go$" |
150 |
| - new: false |
151 |
| - # Default set of ignore rules is quite usefull to avoid false positives |
152 |
| - # and annoying warnings no one cares about |
153 |
| - exclude-use-default: true |
154 |
| - include: |
155 |
| - # Re-enable revive's doc comment linters: |
156 |
| - - EXC0012 |
157 |
| - - EXC0013 |
158 |
| - - EXC0014 |
159 |
| - - EXC0015 |
0 commit comments