forked from zeta-chain/node
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.golangci.yml
More file actions
96 lines (86 loc) · 1.85 KB
/
.golangci.yml
File metadata and controls
96 lines (86 loc) · 1.85 KB
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
# Reference:
# https://github.com/golangci/golangci-lint/blob/a25cd63879d2252bcee283c5aca0c737ff6ff801/.golangci.reference.yml
version: "2"
run:
go: "1.23"
timeout: 30m
tests: false
# https://golangci-lint.run/usage/formatters
formatters:
enable: [gci, gofmt, goimports, golines]
settings:
# Gci controls Go package import order and makes it always deterministic
gci:
sections:
- standard
- default
- prefix(github.com/zeta-chain/node)
golines:
max-len: 120
exclusions:
generated: strict
paths:
- ".*_test\\.go$"
- ".*\\.pb\\.go$"
- .git
- .github
- .idea
- .vscode
- ./typescript
- ./contrib/localnet
# https://golangci-lint.run/usage/linters
linters:
default: none
enable:
- bodyclose
- dogsled
- errcheck
- goconst
- govet
- ineffassign
- misspell
- prealloc
- revive
- staticcheck
- unconvert
- unused
- whitespace
settings:
errcheck:
exclude-functions:
- fmt:.*
- io/ioutil:^Read.*,
- github.com/spf13/cobra:MarkFlagRequired
- github.com/spf13/viper:BindPFlag
gocyclo:
min-complexity: 11
govet:
disable:
- composites
exclusions:
generated: strict
presets:
- comments
- common-false-positives
- legacy
- std-error-handling
paths:
- ".*\\.pb\\.go$"
- .git
- .github
- .idea
- .vscode
- ./typescript
- ./contrib/localnet
- ./scripts
rules:
# https://staticcheck.dev/docs/checks
# We can enforce more rules if needed.
- linters: [staticcheck]
text: "QF1002"
- linters: [staticcheck]
text: "QF1003"
- linters: [staticcheck]
text: "SA1019"
- linters: [staticcheck]
text: "QF1008"