generated from flashbots/go-template
-
Notifications
You must be signed in to change notification settings - Fork 118
/
.golangci.yaml
131 lines (118 loc) · 2.53 KB
/
.golangci.yaml
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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
# https://golangci-lint.run/usage/linters
linters:
enable-all: true
disable:
- cyclop
- depguard
- forbidigo
- funlen
- gochecknoglobals
- gochecknoinits
- gocritic
- godot
- godox
- gomnd
- lll
- musttag
- nestif
- nilnil
- nlreturn
- noctx
- nonamedreturns
- nosnakecase
- paralleltest
- revive
- testpackage
- unparam
- varnamelen
- wrapcheck
- wsl
- deadcode
- varcheck
- interfacebloat
- exhaustruct
#
# Disabled because of generics:
#
- contextcheck
- rowserrcheck
- sqlclosecheck
- structcheck
- wastedassign
#
# Disabled because deprecated:
#
- exhaustivestruct
- golint
- ifshort
- interfacer
- maligned
- scopelint
linters-settings:
#
# The G108 rule throws a false positive. We're not actually vulnerable. If
# you're not careful the profiling endpoint is automatically exposed on
# /debug/pprof if you import net/http/pprof. See this link:
#
# https://mmcloughlin.com/posts/your-pprof-is-showing
#
gosec:
excludes:
- G108
gocognit:
min-complexity: 85 # default: 30
gocyclo:
min-complexity: 70 # default: 30
gomoddirectives:
replace-allow-list:
- github.com/attestantio/go-builder-client
- github.com/attestantio/go-eth2-client
maintidx:
under: 5
tagliatelle:
case:
rules:
json: snake
gofumpt:
extra-rules: true
exhaustruct:
exclude:
#
# Because it's easier to read without the other fields.
#
- 'GetPayloadsFilters'
#
# Easier to read with only one of the versioned payloads.
#
- 'VersionedSubmitBlindedBlockResponse'
- 'VersionedExecutionPayload'
- 'VersionedSignedBuilderBid'
#
# Structures outside our control that have a ton of settings. It doesn't
# make sense to specify all of the fields.
#
- 'cobra.Command'
- 'database.*Entry'
- 'http.Server'
- 'logrus.*Formatter'
- 'Options' # redis
#
# Excluded because there are private fields (not capitalized) that are
# not initialized. If possible, I think these should be altered.
#
- 'Datastore'
- 'Housekeeper'
- 'MockBeaconClient'
- 'RelayAPI'
- 'Webserver'
issues:
exclude-rules:
- path: (.+)_test.go
linters:
- exhaustruct
- path: database/.*.go
linters:
- goconst
- path: cmd/tool/.*.go
linters:
- goconst