Browse Source

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
pull/3980/head
Anton Kaliaev 5 years ago
committed by GitHub
parent
commit
777ff271cb
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 8 deletions
  1. +0
    -6
      .golangci.yml
  2. +2
    -2
      types/vote_set.go

+ 0
- 6
.golangci.yml 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:


+ 2
- 2
types/vote_set.go 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()
}


Loading…
Cancel
Save