Merge PR #1687: tools: Ensure Gopkg.lock is correct in linting

* tools: Ensure Gopkg.lock is correct in linting

This adds dep status to the lint process. Also fixes linting errors
that existed earlier. (not sure why they didn't show up on CI)

Closes #1574

* Update dep, use the lock file new dep version creates
This commit is contained in:
Dev Ojha 2018-07-14 14:48:41 -07:00 committed by Christopher Goes
parent bb1f1a21bf
commit a2047c5c81
5 changed files with 7 additions and 8 deletions

1
Gopkg.lock generated
View File

@ -2,7 +2,6 @@
[[projects]]
branch = "master"
digest = "1:09a7f74eb6bb3c0f14d8926610c87f569c5cff68e978d30e9a3540aeb626fdf0"
name = "github.com/bartekn/go-bip39"
packages = ["."]

View File

@ -10,11 +10,6 @@
# name = "github.com/user/project"
# version = "1.0.0"
#
# [[constraint]]
# name = "github.com/user/project2"
# branch = "dev"
# source = "github.com/myfork/project2"
#
# [[override]]
# name = "github.com/x/y"
# version = "2.4.0"
@ -66,7 +61,7 @@
[[constraint]]
name = "github.com/bartekn/go-bip39"
branch = "master"
revision = "a05967ea095d81c8fe4833776774cfaff8e5036c"
[[constraint]]
name = "github.com/zondax/ledger-goclient"

View File

@ -119,6 +119,8 @@ test_lint:
gometalinter.v2 --config=tools/gometalinter.json ./...
!(gometalinter.v2 --disable-all --enable='errcheck' --vendor ./... | grep -v "client/")
find . -name '*.go' -type f -not -path "./vendor*" -not -path "*.git*" | xargs gofmt -d -s
dep status >> /dev/null
!(grep -n branch Gopkg.toml)
format:
find . -name '*.go' -type f -not -path "./vendor*" -not -path "*.git*" | xargs gofmt -w -s

View File

@ -153,6 +153,9 @@ func (pkl PrivKeyLedgerSecp256k1) pubkeyLedgerSecp256k1() (pub tmcrypto.PubKey,
// re-serialize in the 33-byte compressed format
cmp, err := secp256k1.ParsePubKey(key[:], secp256k1.S256())
if err != nil {
return nil, fmt.Errorf("error parsing public key: %v", err)
}
copy(pk[:], cmp.SerializeCompressed())
return pk, nil

View File

@ -158,7 +158,7 @@ func GetCmdVote(cdc *wire.Codec) *cobra.Command {
return err
}
fmt.Printf("Vote[Voter:%s,ProposalID:%d,Option:%s]", bechVoter, msg.ProposalID, msg.Option)
fmt.Printf("Vote[Voter:%s,ProposalID:%d,Option:%s]", bechVoter, msg.ProposalID, msg.Option.String())
// build and sign the transaction, then broadcast to Tendermint
ctx := context.NewCoreContextFromViper().WithDecoder(authcmd.GetAccountDecoder(cdc))