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:
Anton Kaliaev
2019-09-10 21:58:17 +04:00
committed by GitHub
parent 2edd89b450
commit 777ff271cb
2 changed files with 2 additions and 8 deletions

View File

@@ -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:

View File

@@ -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()
}