-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
.golangci.yml
56 lines (54 loc) · 1.33 KB
/
.golangci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
linters:
# https://golangci-lint.run/usage/linters/#enabled-by-default
enable:
- asciicheck
- depguard
- dupword
- durationcheck
- errorlint
- gosec
- gocritic
- gofmt
- gofumpt
- goimports
- misspell
- nolintlint
- predeclared
- revive
- testifylint
- unconvert
linters-settings:
gofmt:
simplify: true
depguard:
rules:
main:
deny:
- pkg: "io/ioutil"
desc: "Use corresponding 'os' or 'io' functions instead."
- pkg: "github.com/pkg/errors"
desc: "Use 'errors' or 'fmt' instead of github.com/pkg/errors"
- pkg: "golang.org/x/exp/slices"
desc: "Use 'slices' instead."
revive:
# https://github.com/mgechev/revive/blob/master/defaults.toml
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md
enable-all-rules: true
ignore-generated-header: true
severity: warning
rules:
- name: line-length-limit
severity: error
arguments: [120]
- name: add-constant
disabled: true
- name: cognitive-complexity
disabled: true
- name: cyclomatic
disabled: true
- name: unused-receiver
disabled: true
- name: unhandled-error
arguments:
- "fmt.Println"
- "fmt.Printf"