|
1 | 1 | { |
| 2 | + "version": "2", |
2 | 3 | "formatters": { |
3 | 4 | "enable": [ |
4 | | - "gofmt" |
| 5 | + "gofmt", |
| 6 | + "gofumpt" |
5 | 7 | ], |
6 | 8 | "exclusions": { |
7 | 9 | "generated": "lax", |
8 | 10 | "paths": [ |
9 | 11 | ".*\\.my\\.go$", |
10 | 12 | "lib/bad.go", |
11 | | - ".github", |
12 | 13 | ".make", |
| 14 | + ".vscode", |
13 | 15 | "dist", |
14 | 16 | "third_party$", |
15 | | - "builtin$", |
16 | | - "examples$" |
| 17 | + "builtin$" |
17 | 18 | ] |
18 | 19 | }, |
19 | 20 | "settings": { |
20 | 21 | "gci": { |
21 | 22 | "sections": [ |
22 | | - "prefix(github.com/org/project)" |
| 23 | + "standard", |
| 24 | + "default", |
| 25 | + "prefix(github.com/bsv-blockchain/go-subtree)" |
23 | 26 | ] |
24 | 27 | }, |
25 | 28 | "gofmt": { |
|
30 | 33 | }, |
31 | 34 | "goimports": { |
32 | 35 | "local-prefixes": [ |
33 | | - "github.com/org/project" |
| 36 | + "github.com/bsv-blockchain/go-subtree" |
34 | 37 | ] |
35 | 38 | } |
36 | 39 | } |
37 | 40 | }, |
38 | | - "issues": { |
39 | | - "max-issues-per-linter": 0, |
40 | | - "max-same-issues": 0, |
41 | | - "new": false, |
42 | | - "new-from-rev": "", |
43 | | - "uniq-by-line": true |
44 | | - }, |
45 | 41 | "linters": { |
46 | | - "disable": [ |
47 | | - "gocritic", |
48 | | - "godot", |
49 | | - "godox", |
50 | | - "testifylint", |
51 | | - "revive", |
52 | | - "forbidigo", |
53 | | - "err113", |
54 | | - "errorlint", |
55 | | - "gosec", |
56 | | - "unused" |
57 | | - ], |
58 | 42 | "enable": [ |
| 43 | + "arangolint", |
59 | 44 | "asasalint", |
60 | 45 | "asciicheck", |
61 | | - "err113", |
62 | 46 | "bidichk", |
63 | 47 | "bodyclose", |
64 | 48 | "containedctx", |
65 | 49 | "contextcheck", |
66 | 50 | "copyloopvar", |
67 | 51 | "dogsled", |
68 | | - "recvcheck", |
69 | | - "godox", |
70 | | - "nilnil", |
71 | | - "nilnesserr", |
72 | | - "gomoddirectives", |
73 | 52 | "durationcheck", |
| 53 | + "embeddedstructfieldcheck", |
| 54 | + "errcheck", |
74 | 55 | "errchkjson", |
75 | 56 | "errname", |
76 | 57 | "errorlint", |
77 | 58 | "exhaustive", |
78 | 59 | "forbidigo", |
| 60 | + "funcorder", |
79 | 61 | "gocheckcompilerdirectives", |
80 | 62 | "gochecknoinits", |
81 | 63 | "gochecksumtype", |
| 64 | + "goconst", |
| 65 | + "godox", |
82 | 66 | "goheader", |
| 67 | + "gomoddirectives", |
83 | 68 | "gosec", |
84 | 69 | "gosmopolitan", |
| 70 | + "govet", |
85 | 71 | "inamedparam", |
| 72 | + "ineffassign", |
86 | 73 | "loggercheck", |
87 | 74 | "makezero", |
88 | 75 | "mirror", |
89 | 76 | "misspell", |
90 | 77 | "musttag", |
| 78 | + "nakedret", |
91 | 79 | "nilerr", |
| 80 | + "nilnesserr", |
| 81 | + "nilnil", |
92 | 82 | "noctx", |
93 | 83 | "nolintlint", |
94 | 84 | "nosprintfhostport", |
95 | 85 | "prealloc", |
96 | 86 | "predeclared", |
97 | 87 | "protogetter", |
98 | 88 | "reassign", |
99 | | - "revive", |
| 89 | + "recvcheck", |
100 | 90 | "rowserrcheck", |
101 | 91 | "spancheck", |
102 | 92 | "sqlclosecheck", |
103 | | - "testifylint", |
| 93 | + "staticcheck", |
104 | 94 | "unconvert", |
105 | 95 | "unparam", |
| 96 | + "unused", |
106 | 97 | "wastedassign", |
| 98 | + "wsl_v5", |
107 | 99 | "zerologlint" |
108 | 100 | ], |
109 | | - "exclusions": { |
110 | | - "generated": "lax", |
111 | | - "paths": [ |
112 | | - ".*\\.my\\.go$", |
113 | | - "lib/bad.go", |
114 | | - ".github", |
115 | | - ".make", |
116 | | - "dist", |
117 | | - "third_party$", |
118 | | - "builtin$", |
119 | | - "examples$" |
120 | | - ], |
121 | | - "rules": [ |
122 | | - { |
123 | | - "linters": [ |
124 | | - "gocyclo" |
125 | | - ], |
126 | | - "path": "_test\\.go" |
127 | | - }, |
128 | | - { |
129 | | - "linters": [ |
130 | | - "testifylint" |
131 | | - ], |
132 | | - "text": "suite-subtest-run: use ts.Run to run subtest" |
133 | | - }, |
134 | | - { |
135 | | - "linters": [ |
136 | | - "scopelint" |
137 | | - ], |
138 | | - "text": "Using the variable on range scope" |
139 | | - }, |
140 | | - { |
141 | | - "linters": [ |
142 | | - "lll" |
143 | | - ], |
144 | | - "source": "^//go:generate " |
145 | | - }, |
146 | | - { |
147 | | - "path": "(.+)\\.go$", |
148 | | - "text": "abcdef" |
149 | | - } |
150 | | - ] |
151 | | - }, |
| 101 | + "disable": [ |
| 102 | + "err113", |
| 103 | + "gochecknoglobals", |
| 104 | + "gocognit", |
| 105 | + "gocritic", |
| 106 | + "gocyclo", |
| 107 | + "godot", |
| 108 | + "nestif", |
| 109 | + "revive", |
| 110 | + "testifylint" |
| 111 | + ], |
152 | 112 | "settings": { |
| 113 | + "funcorder": { |
| 114 | + "constructor-after-struct": true |
| 115 | + }, |
| 116 | + "revive": { |
| 117 | + "config": ".revive.toml" |
| 118 | + }, |
153 | 119 | "dogsled": { |
154 | 120 | "max-blank-identifiers": 2 |
155 | 121 | }, |
|
170 | 136 | "min-len": 3, |
171 | 137 | "min-occurrences": 10 |
172 | 138 | }, |
173 | | - "gocritic": { |
174 | | - "disabled-checks": [ |
175 | | - "regexpMust" |
176 | | - ], |
177 | | - "disabled-tags": [ |
178 | | - "experimental" |
179 | | - ], |
180 | | - "enabled-tags": [ |
181 | | - "performance" |
182 | | - ], |
183 | | - "settings": { |
184 | | - "captLocal": { |
185 | | - "paramsOnly": true |
186 | | - }, |
187 | | - "rangeValCopy": { |
188 | | - "sizeThreshold": 32 |
189 | | - } |
190 | | - } |
191 | | - }, |
192 | 139 | "gocyclo": { |
193 | 140 | "min-complexity": 10 |
194 | 141 | }, |
195 | 142 | "godox": { |
196 | 143 | "keywords": [ |
197 | 144 | "NOTE", |
198 | 145 | "OPTIMIZE", |
199 | | - "HACK" |
| 146 | + "HACK", |
| 147 | + "ATTN", |
| 148 | + "ATTENTION" |
200 | 149 | ] |
201 | 150 | }, |
202 | 151 | "govet": { |
203 | | - "disable-all": false, |
204 | 152 | "enable": [ |
205 | 153 | "atomicalign", |
206 | 154 | "shadow" |
207 | 155 | ], |
208 | | - "enable-all": false, |
209 | 156 | "settings": { |
210 | 157 | "printf": { |
211 | 158 | "funcs": [ |
|
222 | 169 | "tab-width": 1 |
223 | 170 | }, |
224 | 171 | "misspell": { |
| 172 | + "locale": "US", |
225 | 173 | "ignore-rules": [ |
226 | 174 | "bsv", |
227 | 175 | "bitcoin" |
228 | | - ], |
229 | | - "locale": "US" |
| 176 | + ] |
230 | 177 | }, |
231 | 178 | "nakedret": { |
232 | 179 | "max-func-lines": 30 |
|
244 | 191 | "range-loops": true, |
245 | 192 | "simple": true |
246 | 193 | }, |
247 | | - "rowserrcheck": { |
248 | | - "packages": [ |
249 | | - "github.com/jmoiron/sqlx" |
250 | | - ] |
251 | | - }, |
252 | | - "testpackage": { |
253 | | - "skip-regexp": "(export|internal)_test\\.go" |
254 | | - }, |
255 | 194 | "unparam": { |
256 | 195 | "check-exported": false |
257 | 196 | }, |
258 | | - "whitespace": { |
259 | | - "multi-func": false, |
260 | | - "multi-if": false |
261 | | - }, |
262 | 197 | "wsl": { |
263 | 198 | "allow-assign-and-call": true, |
264 | 199 | "allow-cuddle-declarations": true, |
265 | 200 | "allow-multiline-assign": true, |
266 | | - "allow-separated-leading-comment": false, |
267 | | - "allow-trailing-comment": false, |
268 | | - "force-case-trailing-whitespace": 0, |
269 | | - "force-err-cuddling": false, |
270 | 201 | "strict-append": true |
271 | 202 | } |
272 | 203 | } |
273 | 204 | }, |
| 205 | + "run": { |
| 206 | + "allow-parallel-runners": true, |
| 207 | + "concurrency": 8, |
| 208 | + "issues-exit-code": 1, |
| 209 | + "tests": true |
| 210 | + }, |
274 | 211 | "output": { |
275 | 212 | "formats": { |
276 | 213 | "text": { |
277 | 214 | "path": "stdout", |
278 | 215 | "print-issued-lines": true, |
279 | 216 | "print-linter-name": true |
280 | 217 | } |
281 | | - }, |
282 | | - "path-prefix": "" |
283 | | - }, |
284 | | - "run": { |
285 | | - "allow-parallel-runners": false, |
286 | | - "build-tags": [ |
287 | | - "mytag" |
288 | | - ], |
289 | | - "concurrency": 4, |
290 | | - "issues-exit-code": 1, |
291 | | - "tests": true |
| 218 | + } |
292 | 219 | }, |
293 | 220 | "severity": { |
294 | | - "default": "error", |
| 221 | + "default": "warning", |
295 | 222 | "rules": [ |
296 | 223 | { |
297 | 224 | "linters": [ |
298 | | - "dupl" |
| 225 | + "dupl", |
| 226 | + "misspell", |
| 227 | + "makezero" |
299 | 228 | ], |
300 | 229 | "severity": "info" |
301 | 230 | } |
302 | 231 | ] |
303 | 232 | }, |
304 | | - "version": "2" |
| 233 | + "issues": { |
| 234 | + "uniq-by-line": true |
| 235 | + } |
305 | 236 | } |
0 commit comments