linter fixes (#5733)
* make .golangcy.yml work with Goland's Golint plugin Explicitly disable all linters. Whitelist of enabled plugins is already provided. This would enable Goland users to user Golint plugin. * fix deadcode warnings * fix gocritic error unslice: could simplify pkBytes[:] to pkBytes
This commit is contained in:
parent
5f14dc2e42
commit
2ae25caa74
|
@ -3,6 +3,7 @@
|
|||
# timeout: 5m
|
||||
|
||||
linters:
|
||||
disable-all: true
|
||||
enable:
|
||||
- bodyclose
|
||||
- deadcode
|
||||
|
@ -30,8 +31,6 @@ linters:
|
|||
- unconvert
|
||||
- unused
|
||||
- misspell
|
||||
disable:
|
||||
- errcheck
|
||||
|
||||
issues:
|
||||
exclude-rules:
|
||||
|
|
|
@ -56,10 +56,6 @@ var (
|
|||
pubkeys = []crypto.PubKey{
|
||||
delPk1, delPk2, delPk3, valOpPk1, valOpPk2, valOpPk3,
|
||||
}
|
||||
|
||||
emptyDelAddr sdk.AccAddress
|
||||
emptyValAddr sdk.ValAddress
|
||||
emptyPubkey crypto.PubKey
|
||||
)
|
||||
|
||||
// TODO: remove dependency with staking
|
||||
|
@ -76,7 +72,7 @@ func newPubKey(pk string) (res crypto.PubKey) {
|
|||
panic(err)
|
||||
}
|
||||
var pkEd ed25519.PubKeyEd25519
|
||||
copy(pkEd[:], pkBytes[:])
|
||||
copy(pkEd[:], pkBytes)
|
||||
return pkEd
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue