mirror of
https://github.com/tendermint/tendermint.git
synced 2026-01-07 05:46:32 +00:00
enable unconvert, goconst and nakedret linters (#3973)
This should've been a part of https://github.com/tendermint/tendermint/pull/3960, but I forgot about it while reviewing. A good programmer is someone who always looks both ways before crossing a one-way street. - Doug Linder
This commit is contained in:
@@ -9,10 +9,7 @@ linters:
|
||||
- maligned
|
||||
- errcheck
|
||||
- interfacer
|
||||
- unconvert
|
||||
- goconst
|
||||
- unparam
|
||||
- nakedret
|
||||
- lll
|
||||
- gochecknoglobals
|
||||
- gochecknoinits
|
||||
@@ -29,9 +26,6 @@ linters:
|
||||
# suggest-new: true
|
||||
# dupl:
|
||||
# threshold: 100
|
||||
# goconst:
|
||||
# min-len: 2
|
||||
# min-occurrences: 2
|
||||
# depguard:
|
||||
# list-type: blacklist
|
||||
# packages:
|
||||
|
||||
@@ -434,7 +434,7 @@ func (voteSet *VoteSet) StringIndented(indent string) string {
|
||||
voteStrings := make([]string, len(voteSet.votes))
|
||||
for i, vote := range voteSet.votes {
|
||||
if vote == nil {
|
||||
voteStrings[i] = "nil-Vote"
|
||||
voteStrings[i] = nilVoteStr
|
||||
} else {
|
||||
voteStrings[i] = vote.String()
|
||||
}
|
||||
@@ -499,7 +499,7 @@ func (voteSet *VoteSet) voteStrings() []string {
|
||||
voteStrings := make([]string, len(voteSet.votes))
|
||||
for i, vote := range voteSet.votes {
|
||||
if vote == nil {
|
||||
voteStrings[i] = "nil-Vote"
|
||||
voteStrings[i] = nilVoteStr
|
||||
} else {
|
||||
voteStrings[i] = vote.String()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user