From fbe2047f58d33db827dcdc87997701d0873ea65f Mon Sep 17 00:00:00 2001 From: Facundo Date: Mon, 30 Oct 2023 19:10:04 +0100 Subject: [PATCH] run make lint-fix --- ante/ante_test.go | 4 ++-- app/upgradev3/min_commission_test.go | 2 +- app/wasm/query/querier.go | 2 +- app/wasm/test/cw20_base_test.go | 8 ++++---- cmd/umeed/cmd/app_creator.go | 6 +++--- sdkclient/client.go | 2 +- sdkclient/tx/client.go | 4 ++-- tests/cli/suite.go | 2 +- tests/e2e/e2e_leverage_test.go | 4 ++-- tests/e2e/setup/gaia.go | 2 +- tests/e2e/setup/setup.go | 12 ++++++------ tests/e2e/setup/utils.go | 1 - tests/simulation/sim_test.go | 16 ++++++++-------- x/oracle/simulations/operations.go | 2 +- x/oracle/types/vote_test.go | 4 ++-- x/ugov/module/module.go | 2 +- 16 files changed, 36 insertions(+), 37 deletions(-) diff --git a/ante/ante_test.go b/ante/ante_test.go index 16bfb482d1..3824c51cc9 100644 --- a/ante/ante_test.go +++ b/ante/ante_test.go @@ -4,6 +4,8 @@ import ( "fmt" "testing" + tmrand "github.com/cometbft/cometbft/libs/rand" + tmproto "github.com/cometbft/cometbft/proto/tendermint/types" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/tx" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" @@ -13,8 +15,6 @@ import ( "github.com/cosmos/cosmos-sdk/types/tx/signing" xauthsigning "github.com/cosmos/cosmos-sdk/x/auth/signing" "github.com/stretchr/testify/suite" - tmrand "github.com/cometbft/cometbft/libs/rand" - tmproto "github.com/cometbft/cometbft/proto/tendermint/types" umeeapp "github.com/umee-network/umee/v6/app" ) diff --git a/app/upgradev3/min_commission_test.go b/app/upgradev3/min_commission_test.go index fab707cbd1..853c2a48e3 100644 --- a/app/upgradev3/min_commission_test.go +++ b/app/upgradev3/min_commission_test.go @@ -3,9 +3,9 @@ package upgradev3 import ( "testing" + tmproto "github.com/cometbft/cometbft/proto/tendermint/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/staking/types" - tmproto "github.com/cometbft/cometbft/proto/tendermint/types" "gotest.tools/v3/assert" ) diff --git a/app/wasm/query/querier.go b/app/wasm/query/querier.go index a52899a0db..a02420158e 100644 --- a/app/wasm/query/querier.go +++ b/app/wasm/query/querier.go @@ -4,10 +4,10 @@ import ( "fmt" wasmvmtypes "github.com/CosmWasm/wasmvm/types" + abci "github.com/cometbft/cometbft/abci/types" "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" - abci "github.com/cometbft/cometbft/abci/types" // stargate client "github.com/umee-network/umee/v6/client" diff --git a/app/wasm/test/cw20_base_test.go b/app/wasm/test/cw20_base_test.go index b4862e1695..4cd6e6a137 100644 --- a/app/wasm/test/cw20_base_test.go +++ b/app/wasm/test/cw20_base_test.go @@ -12,17 +12,17 @@ import ( wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper" wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types" wasmvmtypes "github.com/CosmWasm/wasmvm/types" - simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" - "github.com/cosmos/cosmos-sdk/types/module/testutil" + tmrand "github.com/cometbft/cometbft/libs/rand" + tmproto "github.com/cometbft/cometbft/proto/tendermint/types" "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1" cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" + simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/module/testutil" govv1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" minttypes "github.com/cosmos/cosmos-sdk/x/mint/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - tmrand "github.com/cometbft/cometbft/libs/rand" - tmproto "github.com/cometbft/cometbft/proto/tendermint/types" "gotest.tools/v3/assert" umeeapp "github.com/umee-network/umee/v6/app" diff --git a/cmd/umeed/cmd/app_creator.go b/cmd/umeed/cmd/app_creator.go index fddcc94c0e..a4de5799dc 100644 --- a/cmd/umeed/cmd/app_creator.go +++ b/cmd/umeed/cmd/app_creator.go @@ -9,6 +9,9 @@ import ( "github.com/CosmWasm/wasmd/x/wasm" wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper" + dbm "github.com/cometbft/cometbft-db" + "github.com/cometbft/cometbft/libs/log" + cmttypes "github.com/cometbft/cometbft/types" "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/server" @@ -19,9 +22,6 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" "github.com/cosmos/cosmos-sdk/types/module/testutil" - dbm "github.com/cometbft/cometbft-db" - "github.com/cometbft/cometbft/libs/log" - cmttypes "github.com/cometbft/cometbft/types" "github.com/prometheus/client_golang/prometheus" "github.com/spf13/cast" diff --git a/sdkclient/client.go b/sdkclient/client.go index 8a5545dabd..f829caddc1 100644 --- a/sdkclient/client.go +++ b/sdkclient/client.go @@ -8,10 +8,10 @@ import ( rpcclient "github.com/cometbft/cometbft/rpc/client" rpchttp "github.com/cometbft/cometbft/rpc/client/http" + "github.com/cosmos/cosmos-sdk/types/module/testutil" "github.com/rs/zerolog" "github.com/umee-network/umee/v6/sdkclient/query" "github.com/umee-network/umee/v6/sdkclient/tx" - "github.com/cosmos/cosmos-sdk/types/module/testutil" ) // Client provides basic capabilities to connect to a Cosmos SDK based chain and execute diff --git a/sdkclient/tx/client.go b/sdkclient/tx/client.go index 359d21dbba..fa72167fc3 100644 --- a/sdkclient/tx/client.go +++ b/sdkclient/tx/client.go @@ -4,6 +4,8 @@ import ( "log" "os" + rpchttp "github.com/cometbft/cometbft/rpc/client/http" + tmjsonclient "github.com/cometbft/cometbft/rpc/jsonrpc/client" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/client/tx" @@ -12,8 +14,6 @@ import ( "github.com/cosmos/cosmos-sdk/types/module/testutil" "github.com/cosmos/cosmos-sdk/types/tx/signing" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - rpchttp "github.com/cometbft/cometbft/rpc/client/http" - tmjsonclient "github.com/cometbft/cometbft/rpc/jsonrpc/client" ) type Client struct { diff --git a/tests/cli/suite.go b/tests/cli/suite.go index a435bbdb92..42e1972437 100644 --- a/tests/cli/suite.go +++ b/tests/cli/suite.go @@ -4,12 +4,12 @@ import ( "fmt" "testing" + tmcli "github.com/cometbft/cometbft/libs/cli" "github.com/cosmos/cosmos-sdk/client/flags" "github.com/cosmos/cosmos-sdk/testutil" clitestutil "github.com/cosmos/cosmos-sdk/testutil/cli" "github.com/cosmos/cosmos-sdk/testutil/network" sdk "github.com/cosmos/cosmos-sdk/types" - tmcli "github.com/cometbft/cometbft/libs/cli" "gotest.tools/v3/assert" ) diff --git a/tests/e2e/e2e_leverage_test.go b/tests/e2e/e2e_leverage_test.go index 216ac1f7dc..26b38229f3 100644 --- a/tests/e2e/e2e_leverage_test.go +++ b/tests/e2e/e2e_leverage_test.go @@ -102,8 +102,8 @@ func (s *E2ETest) TestLeverageBasics() { }, ) - valAddr, err := s.Chain.Validators[0].KeyInfo.GetAddress() - s.Require().NoError(err) + // valAddr, err := s.Chain.Validators[0].KeyInfo.GetAddress() + // s.Require().NoError(err) s.Run( "initial leverage supply", func() { diff --git a/tests/e2e/setup/gaia.go b/tests/e2e/setup/gaia.go index 248e630ab3..595e0c8e03 100644 --- a/tests/e2e/setup/gaia.go +++ b/tests/e2e/setup/gaia.go @@ -8,9 +8,9 @@ import ( "path/filepath" "time" + rpchttp "github.com/cometbft/cometbft/rpc/client/http" "github.com/ory/dockertest/v3" "github.com/ory/dockertest/v3/docker" - rpchttp "github.com/cometbft/cometbft/rpc/client/http" "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/crypto/keyring" diff --git a/tests/e2e/setup/setup.go b/tests/e2e/setup/setup.go index 3865480322..d4a49df11e 100644 --- a/tests/e2e/setup/setup.go +++ b/tests/e2e/setup/setup.go @@ -10,6 +10,10 @@ import ( "strings" "time" + dbm "github.com/cometbft/cometbft-db" + tmconfig "github.com/cometbft/cometbft/config" + tmjson "github.com/cometbft/cometbft/libs/json" + rpchttp "github.com/cometbft/cometbft/rpc/client/http" "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/server" srvconfig "github.com/cosmos/cosmos-sdk/server/config" @@ -17,16 +21,12 @@ import ( "github.com/cosmos/cosmos-sdk/types/module/testutil" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types" - tmconfig "github.com/cometbft/cometbft/config" - tmjson "github.com/cometbft/cometbft/libs/json" - rpchttp "github.com/cometbft/cometbft/rpc/client/http" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + govtypesv1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" "github.com/ory/dockertest/v3" "github.com/ory/dockertest/v3/docker" "github.com/spf13/viper" "github.com/stretchr/testify/suite" - dbm "github.com/cometbft/cometbft-db" - govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" - govtypesv1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" "github.com/umee-network/umee/v6/app" appparams "github.com/umee-network/umee/v6/app/params" diff --git a/tests/e2e/setup/utils.go b/tests/e2e/setup/utils.go index d02d0c206f..1ede526653 100644 --- a/tests/e2e/setup/utils.go +++ b/tests/e2e/setup/utils.go @@ -308,7 +308,6 @@ func (s *E2ETestSuite) BroadcastTxWithRetry(msg sdk.Msg, cli client.Client) erro // if we were told an expected account sequence, we should use it next time re := regexp.MustCompile(`expected [\d]+`) n, err := strconv.Atoi(strings.TrimPrefix(re.FindString(err.Error()), "expected ")) - if err != nil { return err } diff --git a/tests/simulation/sim_test.go b/tests/simulation/sim_test.go index bdbe3bee82..d219d045d6 100644 --- a/tests/simulation/sim_test.go +++ b/tests/simulation/sim_test.go @@ -9,6 +9,13 @@ import ( "strings" "testing" + dbm "github.com/cometbft/cometbft-db" + abci "github.com/cometbft/cometbft/abci/types" + "github.com/cometbft/cometbft/libs/log" + tmrand "github.com/cometbft/cometbft/libs/rand" + tmproto "github.com/cometbft/cometbft/proto/tendermint/types" + "github.com/cosmos/cosmos-sdk/baseapp" + simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" sdk "github.com/cosmos/cosmos-sdk/types" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" @@ -21,18 +28,11 @@ import ( minttypes "github.com/cosmos/cosmos-sdk/x/mint/types" paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" "github.com/cosmos/cosmos-sdk/x/simulation" + simcli "github.com/cosmos/cosmos-sdk/x/simulation/client/cli" slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - dbm "github.com/cometbft/cometbft-db" - abci "github.com/cometbft/cometbft/abci/types" - "github.com/cometbft/cometbft/libs/log" - tmrand "github.com/cometbft/cometbft/libs/rand" - tmproto "github.com/cometbft/cometbft/proto/tendermint/types" ibctransfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" ibcexported "github.com/cosmos/ibc-go/v7/modules/core/exported" - "github.com/cosmos/cosmos-sdk/baseapp" - simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" - simcli "github.com/cosmos/cosmos-sdk/x/simulation/client/cli" "gotest.tools/v3/assert" umeeapp "github.com/umee-network/umee/v6/app" diff --git a/x/oracle/simulations/operations.go b/x/oracle/simulations/operations.go index 933608d2d9..78b84b532d 100644 --- a/x/oracle/simulations/operations.go +++ b/x/oracle/simulations/operations.go @@ -29,7 +29,7 @@ const ( OpWeightMsgAggregateExchangeRateVote = "op_weight_msg_exchange_rate_aggregate_vote" //nolint: gosec OpWeightMsgDelegateFeedConsent = "op_weight_msg_exchange_feed_consent" //nolint: gosec - salt = "89b8164ca0b4b8703ae9ab25962f3dd6d1de5d656f5442971a93b2ca7893f654" //nolint: gosec + salt = "89b8164ca0b4b8703ae9ab25962f3dd6d1de5d656f5442971a93b2ca7893f654" ) var ( diff --git a/x/oracle/types/vote_test.go b/x/oracle/types/vote_test.go index d6cc69add5..d48b9726c1 100644 --- a/x/oracle/types/vote_test.go +++ b/x/oracle/types/vote_test.go @@ -77,13 +77,13 @@ func TestParseExchangeRateTuples(t *testing.T) { } func TestDenomExchangeRateString(t *testing.T) { - t1 := time.Date(2022, 9, 18, 15, 55, 01, 0, time.UTC) + t1 := time.Date(2022, 9, 18, 15, 55, 0o1, 0, time.UTC) er := DenomExchangeRate{Denom: "ABCD", Rate: sdk.MustNewDecFromStr("1.5"), Timestamp: t1} assert.Equal(t, `{"denom":"ABCD","rate":"1.500000000000000000","timestamp":"2022-09-18T15:55:01Z"}`, er.String()) } func TestExchangeRateString(t *testing.T) { - t1 := time.Date(2022, 9, 18, 15, 55, 01, 0, time.UTC) + t1 := time.Date(2022, 9, 18, 15, 55, 0o1, 0, time.UTC) er := ExchangeRate{Rate: sdk.MustNewDecFromStr("1.5"), Timestamp: t1} assert.Equal(t, `{"rate":"1.500000000000000000","timestamp":"2022-09-18T15:55:01Z"}`, er.String()) } diff --git a/x/ugov/module/module.go b/x/ugov/module/module.go index b45ca34409..808ee4ea1e 100644 --- a/x/ugov/module/module.go +++ b/x/ugov/module/module.go @@ -5,12 +5,12 @@ import ( "encoding/json" "fmt" + abci "github.com/cometbft/cometbft/abci/types" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" codectypes "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" - abci "github.com/cometbft/cometbft/abci/types" "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/spf13/cobra"