Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
pr0n00gler committed Nov 27, 2023
1 parent 529134b commit 20d3739
Show file tree
Hide file tree
Showing 194 changed files with 405 additions and 201 deletions.
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,8 @@ format:
@go install github.com/golangci/golangci-lint/cmd/[email protected]
find . -name '*.go' -type f -not -path "./vendor*" -not -path "*.git*" -not -path "./client/docs/statik/statik.go" -not -path "./tests/mocks/*" -not -name "*.pb.go" -not -name "*.pb.gw.go" -not -name "*.pulsar.go" -not -path "./crypto/keys/secp256k1/*" | xargs gofumpt -w -l
golangci-lint run --fix
goimports -w -local github.com/neutron-org .

.PHONY: format

###############################################################################
Expand Down
1 change: 1 addition & 0 deletions app/genesis.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
globalfeetypes "github.com/cosmos/gaia/v11/x/globalfee/types"
ibcclienttypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types"
ibcchanneltypes "github.com/cosmos/ibc-go/v7/modules/core/04-channel/types"

"github.com/neutron-org/neutron/app/params"
)

Expand Down
1 change: 1 addition & 0 deletions app/upgrades/v3/upgrades.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/module"
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"

"github.com/neutron-org/neutron/app/upgrades"

crontypes "github.com/neutron-org/neutron/x/cron/types"
Expand Down
1 change: 1 addition & 0 deletions tests/ibc/swap_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"encoding/json"

"cosmossdk.io/math"

dextypes "github.com/neutron-org/neutron/x/dex/types"
swaptypes "github.com/neutron-org/neutron/x/ibcswap/types"
)
Expand Down
3 changes: 2 additions & 1 deletion testutil/apptesting/test_suite.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@ import (
"github.com/cosmos/cosmos-sdk/baseapp"
"github.com/cosmos/cosmos-sdk/store/rootmulti"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/stretchr/testify/suite"

"github.com/neutron-org/neutron/app"
"github.com/neutron-org/neutron/testutil"
dexmoduletypes "github.com/neutron-org/neutron/x/dex/types"
"github.com/stretchr/testify/suite"
)

type KeeperTestHelper struct {
Expand Down
3 changes: 2 additions & 1 deletion testutil/cron/keeper/cron.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@ import (
"github.com/cosmos/cosmos-sdk/store"
storetypes "github.com/cosmos/cosmos-sdk/store/types"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/stretchr/testify/require"

"github.com/neutron-org/neutron/x/cron/keeper"
"github.com/neutron-org/neutron/x/cron/types"
"github.com/stretchr/testify/require"
)

func CronKeeper(t testing.TB, wasmMsgServer types.WasmMsgServer, accountKeeper types.AccountKeeper) (*keeper.Keeper, sdk.Context) {
Expand Down
3 changes: 2 additions & 1 deletion testutil/dex/keeper/dex.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@ import (
storetypes "github.com/cosmos/cosmos-sdk/store/types"
sdk "github.com/cosmos/cosmos-sdk/types"
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
"github.com/stretchr/testify/require"

"github.com/neutron-org/neutron/x/dex/keeper"
"github.com/neutron-org/neutron/x/dex/types"
"github.com/stretchr/testify/require"
)

func DexKeeper(t testing.TB) (*keeper.Keeper, sdk.Context) {
Expand Down
3 changes: 2 additions & 1 deletion testutil/feeburner/keeper/feeburner.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@ import (
"github.com/cosmos/cosmos-sdk/store"
storetypes "github.com/cosmos/cosmos-sdk/store/types"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/stretchr/testify/require"

"github.com/neutron-org/neutron/x/feeburner/keeper"
"github.com/neutron-org/neutron/x/feeburner/types"
"github.com/stretchr/testify/require"
)

func FeeburnerKeeper(t testing.TB) (*keeper.Keeper, sdk.Context) {
Expand Down
3 changes: 2 additions & 1 deletion testutil/interchaintxs/keeper/sudo_middleware.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ import (
"github.com/cosmos/cosmos-sdk/store"
storetypes "github.com/cosmos/cosmos-sdk/store/types"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/stretchr/testify/require"

"github.com/neutron-org/neutron/x/contractmanager"
"github.com/neutron-org/neutron/x/contractmanager/types"
"github.com/stretchr/testify/require"
)

func NewSudoLimitWrapper(t testing.TB, cmKeeper types.ContractManagerKeeper, wasmKeeper types.WasmKeeper) (types.WasmKeeper, sdk.Context, *storetypes.KVStoreKey) {
Expand Down
1 change: 1 addition & 0 deletions testutil/mocks/contractmanager/types/expected_keepers.go

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

1 change: 1 addition & 0 deletions testutil/mocks/interchainqueries/keeper/verify.go

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

1 change: 1 addition & 0 deletions testutil/mocks/interchaintxs/types/expected_keepers.go

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

1 change: 1 addition & 0 deletions testutil/mocks/transfer/types/expected_keepers.go

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

1 change: 1 addition & 0 deletions utils/bank.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"sort"

sdk "github.com/cosmos/cosmos-sdk/types"

"github.com/neutron-org/neutron/x/dex/types"

"github.com/cosmos/cosmos-sdk/types/query"
Expand Down
3 changes: 2 additions & 1 deletion utils/dcli/parsers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ import (

"cosmossdk.io/math"
sdk "github.com/cosmos/cosmos-sdk/types"
. "github.com/neutron-org/neutron/utils/dcli"
"github.com/stretchr/testify/require"

. "github.com/neutron-org/neutron/utils/dcli"
)

type testingStruct struct {
Expand Down
1 change: 1 addition & 0 deletions wasmbinding/bindings/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (
"github.com/cosmos/cosmos-sdk/types/query"

ibcclienttypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types"

"github.com/neutron-org/neutron/x/interchainqueries/types"
)

Expand Down
1 change: 1 addition & 0 deletions wasmbinding/custom_querier.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (

wasmvmtypes "github.com/CosmWasm/wasmvm/types"
sdk "github.com/cosmos/cosmos-sdk/types"

"github.com/neutron-org/neutron/wasmbinding/bindings"
)

Expand Down
1 change: 1 addition & 0 deletions wasmbinding/message_plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import (

bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper"
ibcclienttypes "github.com/cosmos/ibc-go/v7/modules/core/02-client/types"

"github.com/neutron-org/neutron/wasmbinding/bindings"
icqkeeper "github.com/neutron-org/neutron/x/interchainqueries/keeper"
icqtypes "github.com/neutron-org/neutron/x/interchainqueries/types"
Expand Down
1 change: 1 addition & 0 deletions wasmbinding/queries.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"cosmossdk.io/errors"
sdk "github.com/cosmos/cosmos-sdk/types"
sdkquery "github.com/cosmos/cosmos-sdk/types/query"

contractmanagertypes "github.com/neutron-org/neutron/x/contractmanager/types"

"github.com/neutron-org/neutron/wasmbinding/bindings"
Expand Down
1 change: 1 addition & 0 deletions wasmbinding/wasm.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package wasmbinding
import (
wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper"
bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper"

contractmanagerkeeper "github.com/neutron-org/neutron/x/contractmanager/keeper"
cronkeeper "github.com/neutron-org/neutron/x/cron/keeper"
feeburnerkeeper "github.com/neutron-org/neutron/x/feeburner/keeper"
Expand Down
3 changes: 2 additions & 1 deletion x/contractmanager/client/cli/query_failure.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ import (
"github.com/cosmos/cosmos-sdk/client/flags"
"github.com/cosmos/cosmos-sdk/version"
"github.com/cosmos/cosmos-sdk/x/auth/tx"
contractmanagertypes "github.com/neutron-org/neutron/x/contractmanager/types"
"github.com/spf13/cobra"

contractmanagertypes "github.com/neutron-org/neutron/x/contractmanager/types"
)

func CmdFailures() *cobra.Command {
Expand Down
1 change: 1 addition & 0 deletions x/contractmanager/ibc_middleware.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types"
"github.com/cometbft/cometbft/libs/log"
sdk "github.com/cosmos/cosmos-sdk/types"

contractmanagerkeeper "github.com/neutron-org/neutron/x/contractmanager/keeper"
contractmanagertypes "github.com/neutron-org/neutron/x/contractmanager/types"
)
Expand Down
3 changes: 2 additions & 1 deletion x/contractmanager/ibc_middleware_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@ import (
wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/golang/mock/gomock"
"github.com/stretchr/testify/require"

test_keeper "github.com/neutron-org/neutron/testutil/interchaintxs/keeper"
mock_types "github.com/neutron-org/neutron/testutil/mocks/contractmanager/types"
contractmanagerkeeper "github.com/neutron-org/neutron/x/contractmanager/keeper"
"github.com/neutron-org/neutron/x/contractmanager/types"
"github.com/stretchr/testify/require"
)

var (
Expand Down
1 change: 1 addition & 0 deletions x/contractmanager/keeper/failure.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"github.com/cosmos/cosmos-sdk/store/prefix"
sdk "github.com/cosmos/cosmos-sdk/types"
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"

"github.com/neutron-org/neutron/x/contractmanager/types"
)

Expand Down
2 changes: 2 additions & 0 deletions x/contractmanager/keeper/failure_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@ import (
"testing"

"github.com/golang/mock/gomock"

"github.com/neutron-org/neutron/testutil"
mock_types "github.com/neutron-org/neutron/testutil/mocks/contractmanager/types"

channeltypes "github.com/cosmos/ibc-go/v7/modules/core/04-channel/types"

"github.com/neutron-org/neutron/testutil/contractmanager/nullify"

"github.com/cosmos/cosmos-sdk/crypto/keys/ed25519"
Expand Down
3 changes: 2 additions & 1 deletion x/contractmanager/keeper/grpc_query_failure.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ import (
"github.com/cosmos/cosmos-sdk/store/prefix"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/query"
"github.com/neutron-org/neutron/x/contractmanager/types"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"

"github.com/neutron-org/neutron/x/contractmanager/types"
)

const FailuresQueryMaxLimit uint64 = query.DefaultLimit
Expand Down
1 change: 1 addition & 0 deletions x/contractmanager/keeper/keeper.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"github.com/cosmos/cosmos-sdk/codec"
storetypes "github.com/cosmos/cosmos-sdk/store/types"
sdk "github.com/cosmos/cosmos-sdk/types"

"github.com/neutron-org/neutron/x/contractmanager/types"
)

Expand Down
1 change: 1 addition & 0 deletions x/contractmanager/keeper/migrations.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package keeper

import (
sdk "github.com/cosmos/cosmos-sdk/types"

v2 "github.com/neutron-org/neutron/x/contractmanager/migrations/v2"
)

Expand Down
1 change: 1 addition & 0 deletions x/contractmanager/keeper/msg_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"cosmossdk.io/errors"
sdk "github.com/cosmos/cosmos-sdk/types"
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"

"github.com/neutron-org/neutron/x/contractmanager/types"
)

Expand Down
1 change: 1 addition & 0 deletions x/contractmanager/migrations/v2/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"github.com/cosmos/cosmos-sdk/store/prefix"
storetypes "github.com/cosmos/cosmos-sdk/store/types"
sdk "github.com/cosmos/cosmos-sdk/types"

"github.com/neutron-org/neutron/x/contractmanager/types"
)

Expand Down
3 changes: 2 additions & 1 deletion x/contractmanager/migrations/v2/store_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@ import (
"testing"

sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/stretchr/testify/suite"

"github.com/neutron-org/neutron/testutil"
v2 "github.com/neutron-org/neutron/x/contractmanager/migrations/v2"
"github.com/neutron-org/neutron/x/contractmanager/types"
typesv1 "github.com/neutron-org/neutron/x/contractmanager/types/v1"
"github.com/stretchr/testify/suite"
)

type V2ContractManagerMigrationTestSuite struct {
Expand Down
5 changes: 3 additions & 2 deletions x/contractmanager/types/failure.pb.go

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

5 changes: 3 additions & 2 deletions x/contractmanager/types/genesis.pb.go

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

5 changes: 3 additions & 2 deletions x/contractmanager/types/params.pb.go

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

7 changes: 4 additions & 3 deletions x/contractmanager/types/query.pb.go

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

7 changes: 4 additions & 3 deletions x/contractmanager/types/tx.pb.go

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

3 changes: 2 additions & 1 deletion x/contractmanager/types/v1/failure.pb.go

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

Loading

0 comments on commit 20d3739

Please sign in to comment.