Merge PR #1429: tools: Add ineffassign linter
* tools: Add ineffassign linter This errors on assignments that don't actually do anything. i.e. x, err := myFunc(1) y, err = myFunc(2) This will call out that the first function's call error was never used. * Fix makefile, add misspell to makefile
This commit is contained in:
committed by
Christopher Goes
parent
2755c66545
commit
3e14868bd6
@@ -43,6 +43,7 @@ func TestGenesis(t *testing.T) {
|
||||
},
|
||||
}
|
||||
stateBytes, err := json.MarshalIndent(genesisState, "", "\t")
|
||||
require.Nil(t, err)
|
||||
|
||||
vals := []abci.Validator{}
|
||||
bapp.InitChain(abci.RequestInitChain{Validators: vals, AppStateBytes: stateBytes})
|
||||
|
||||
@@ -34,6 +34,9 @@ func CoolAppGenState(cdc *wire.Codec, appGenTxs []json.RawMessage) (appState jso
|
||||
"trend": "ice-cold"
|
||||
}`)
|
||||
appState, err = server.AppendJSON(cdc, appState, key, value)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
key = "pow"
|
||||
value = json.RawMessage(`{
|
||||
"difficulty": 1,
|
||||
|
||||
@@ -6,6 +6,7 @@ import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
abci "github.com/tendermint/abci/types"
|
||||
crypto "github.com/tendermint/go-crypto"
|
||||
@@ -79,6 +80,7 @@ func TestBonding(t *testing.T) {
|
||||
assert.Nil(t, err)
|
||||
|
||||
power, err := stakeKeeper.bondWithoutCoins(ctx, addr, pubKey, sdk.NewCoin("steak", 10))
|
||||
require.Nil(t, err)
|
||||
assert.Equal(t, int64(20), power)
|
||||
|
||||
pk, _, err := stakeKeeper.unbondWithoutCoins(ctx, addr)
|
||||
|
||||
Reference in New Issue
Block a user