Skip to content

Commit ffef3ed

Browse files
pd93andreynering
authored andcommitted
feat: migrate to golangci-lint v2
1 parent 2a60842 commit ffef3ed

File tree

1 file changed

+46
-28
lines changed

1 file changed

+46
-28
lines changed

.golangci.yml

Lines changed: 46 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,56 @@
1-
# NOTE(@andreynering): The linters listed here are additions on top of
2-
# those enabled by default:
3-
#
4-
# https://golangci-lint.run/usage/linters/#enabled-by-default
1+
version: "2"
52

6-
linters:
3+
formatters:
74
enable:
8-
- depguard
9-
- goimports
105
- gofmt
116
- gofumpt
7+
- goimports
8+
settings:
9+
gofmt:
10+
rewrite-rules:
11+
- pattern: interface{}
12+
replacement: any
13+
gofumpt:
14+
module-path: github.com/go-task/task/v3
15+
goimports:
16+
local-prefixes:
17+
- github.com/go-task
18+
exclusions:
19+
generated: lax
20+
paths:
21+
- third_party$
22+
- builtin$
23+
- examples$
24+
25+
linters:
26+
enable:
27+
- depguard
1228
- mirror
1329
- misspell
1430
- noctx
1531
- paralleltest
16-
- usetesting
1732
- thelper
1833
- tparallel
19-
20-
linters-settings:
21-
depguard:
22-
rules:
23-
main:
24-
files:
25-
- "$all"
26-
- "!$test"
27-
- "!**/errors/*.go"
28-
deny:
29-
- pkg: "errors"
30-
desc: "Use github.com/go-task/task/v3/errors instead"
31-
goimports:
32-
local-prefixes: github.com/go-task
33-
gofumpt:
34-
module-path: github.com/go-task/task/v3
35-
gofmt:
36-
rewrite-rules:
37-
- pattern: 'interface{}'
38-
replacement: 'any'
34+
- usetesting
35+
settings:
36+
depguard:
37+
rules:
38+
main:
39+
files:
40+
- $all
41+
- '!$test'
42+
- '!**/errors/*.go'
43+
deny:
44+
- pkg: errors
45+
desc: Use github.com/go-task/task/v3/errors instead
46+
exclusions:
47+
generated: lax
48+
presets:
49+
- comments
50+
- common-false-positives
51+
- legacy
52+
- std-error-handling
53+
paths:
54+
- third_party$
55+
- builtin$
56+
- examples$

0 commit comments

Comments
 (0)