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
|
# timeout: 5m
|
||||||
|
|
||||||
linters:
|
linters:
|
||||||
|
disable-all: true
|
||||||
enable:
|
enable:
|
||||||
- bodyclose
|
- bodyclose
|
||||||
- deadcode
|
- deadcode
|
||||||
|
@ -30,8 +31,6 @@ linters:
|
||||||
- unconvert
|
- unconvert
|
||||||
- unused
|
- unused
|
||||||
- misspell
|
- misspell
|
||||||
disable:
|
|
||||||
- errcheck
|
|
||||||
|
|
||||||
issues:
|
issues:
|
||||||
exclude-rules:
|
exclude-rules:
|
||||||
|
|
|
@ -56,10 +56,6 @@ var (
|
||||||
pubkeys = []crypto.PubKey{
|
pubkeys = []crypto.PubKey{
|
||||||
delPk1, delPk2, delPk3, valOpPk1, valOpPk2, valOpPk3,
|
delPk1, delPk2, delPk3, valOpPk1, valOpPk2, valOpPk3,
|
||||||
}
|
}
|
||||||
|
|
||||||
emptyDelAddr sdk.AccAddress
|
|
||||||
emptyValAddr sdk.ValAddress
|
|
||||||
emptyPubkey crypto.PubKey
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// TODO: remove dependency with staking
|
// TODO: remove dependency with staking
|
||||||
|
@ -76,7 +72,7 @@ func newPubKey(pk string) (res crypto.PubKey) {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
var pkEd ed25519.PubKeyEd25519
|
var pkEd ed25519.PubKeyEd25519
|
||||||
copy(pkEd[:], pkBytes[:])
|
copy(pkEd[:], pkBytes)
|
||||||
return pkEd
|
return pkEd
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue