Skip to content

Commit

Permalink
Merge PR cosmos#1687: tools: Ensure Gopkg.lock is correct in linting
Browse files Browse the repository at this point in the history
* 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 cosmos#1574

* Update dep, use the lock file new dep version creates
  • Loading branch information
ValarDragon authored and cwgoes committed Jul 14, 2018
1 parent bb1f1a2 commit a2047c5
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 8 deletions.
1 change: 0 additions & 1 deletion Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 1 addition & 6 deletions Gopkg.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -66,7 +61,7 @@

[[constraint]]
name = "github.com/bartekn/go-bip39"
branch = "master"
revision = "a05967ea095d81c8fe4833776774cfaff8e5036c"

[[constraint]]
name = "github.com/zondax/ledger-goclient"
Expand Down
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions crypto/ledger_secp256k1.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion x/gov/client/cli/tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit a2047c5

Please sign in to comment.