-
Notifications
You must be signed in to change notification settings - Fork 41
/
.golangci.yml
193 lines (175 loc) · 4.67 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
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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
run:
tests: false
# # timeout for analysis, e.g. 30s, 5m, default is 1m
# timeout: 5m
linters:
disable-all: true
enable:
- asciicheck
- bidichk
- bodyclose
- copyloopvar
- depguard
- dogsled
- durationcheck
- errcheck
- errorlint
- errname
# - forcetypeassert
- gci
- goconst
- gocritic
- gofmt
- goimports
- goheader
- gomodguard
- goprintffuncname
- gosec
- gosimple
- govet
- importas
- ineffassign
- makezero
- misspell
- nakedret
- nolintlint
- prealloc
- predeclared
- promlinter
- revive
- staticcheck
- stylecheck
- tenv
- tparallel
- typecheck
- unconvert
- unparam
- unused
- whitespace
issues:
exclude-rules:
- text: "Use of weak random number generator"
linters:
- gosec
- text: "comment on exported var"
linters:
- revive
- text: "don't use an underscore in package name"
linters:
- revive
- text: "don't use underscores in Go names; const (TxEndpoint|TLCategory|TLType|TLAction)_"
linters:
- revive
- text: "ST1003:"
linters:
- stylecheck
- text: "don't use leading k in Go names"
linters:
- revive
max-issues-per-linter: 10000
max-same-issues: 10000
linters-settings:
depguard:
rules:
main:
files:
- $all
- "!$test"
allow:
- $gostd
- github.com/armon/go-metrics
- cosmossdk.io/api
- cosmossdk.io/client/v2
- cosmossdk.io/collections
- cosmossdk.io/core
- cosmossdk.io/errors
- cosmossdk.io/log
- cosmossdk.io/math
- cosmossdk.io/store
- cosmossdk.io/x/circuit
- cosmossdk.io/x/evidence
- cosmossdk.io/x/feegrant
- cosmossdk.io/x/tx/signing
- cosmossdk.io/x/upgrade
- github.com/cosmos/cosmos-db
- github.com/cosmos/cosmos-sdk
- github.com/cosmos/go-bip39
- github.com/cosmos/ibc-apps
- github.com/cosmos/ibc-go
- github.com/CosmWasm/wasmd
- github.com/CosmWasm/wasmvm/v2
- github.com/cosmos/gogoproto
- github.com/golang/protobuf/proto
- github.com/google/uuid
- github.com/gorilla/mux
- github.com/grpc-ecosystem/grpc-gateway
- github.com/hashicorp/go-metrics
- github.com/provenance-io/provenance
- github.com/spf13/cast
- github.com/spf13/cobra
- github.com/spf13/pflag
- github.com/spf13/viper
- github.com/stretchr/testify/require # used by the test-utils shared toolkit
- github.com/stretchr/testify/assert
- github.com/stretchr/testify/suite
- github.com/cometbft/cometbft/abci/types
- github.com/cometbft/cometbft/config
- github.com/cometbft/cometbft/crypto
- github.com/cometbft/cometbft/crypto/tmhash
- github.com/cometbft/cometbft/libs/cli
- github.com/cometbft/cometbft/libs/json
- github.com/cometbft/cometbft/libs/os
- github.com/cometbft/cometbft/libs/rand
- github.com/cometbft/cometbft/proto/tendermint/types
- github.com/cometbft/cometbft/rpc/jsonrpc/types
- github.com/cometbft/cometbft/types
- github.com/cometbft/cometbft/types/time
- github.com/cometbft/cometbft-db
- github.com/rs/zerolog
- sigs.k8s.io/yaml
deny:
- pkg: "github.com/cosmos/cosmos-sdk/x/params"
desc: "The params module is no more."
test:
files:
- "$test"
allow:
- $gostd
- github.com/stretchr/testify
errcheck:
exclude-functions:
- (fmt.State).Write
gci:
custom-order: true
sections:
- standard
- default
- prefix(github.com/cometbft)
- prefix(cosmossdk.io)
- prefix(github.com/cosmos)
- prefix(github.com/provenance-io)
- blank
- dot
govet:
shadow: true
settings:
printf:
funcs:
- (github.com/golangci/golangci-lint/pkg/logutils.Log).Infof
- (github.com/golangci/golangci-lint/pkg/logutils.Log).Warnf
- (github.com/golangci/golangci-lint/pkg/logutils.Log).Errorf
- (github.com/golangci/golangci-lint/pkg/logutils.Log).Fatalf
golint:
min-confidence: 0
# gocyclo:
# min-complexity: 15
dogsled:
max-blank-identifiers: 3
misspell:
locale: US
ignore-words:
- cancelled
nolintlint:
allow-unused: false
require-explanation: false
require-specific: false