diff --git a/Makefile b/Makefile index c6c9b5b020..90814a3c65 100644 --- a/Makefile +++ b/Makefile @@ -158,12 +158,12 @@ format-tools: lint: format-tools golangci-lint run --tests=false - find . -name '*.go' -type f -not -path "./vendor*" -not -path "./x/vendor*" -not -path "./tests/system/vendor*" -not -path "*.git*" -not -path "*_test.go" | xargs gofumpt -d + find . -name '*.go' -type f -not -path "./vendor*" -not -path "./tests/system/vendor*" -not -path "*.git*" -not -path "*_test.go" | xargs gofumpt -d format: format-tools - find . -name '*.go' -type f -not -path "./vendor*" -not -path "./x/vendor*" -not -path "./tests/system/vendor*" -not -path "*.git*" -not -path "./client/lcd/statik/statik.go" | xargs gofumpt -w - find . -name '*.go' -type f -not -path "./vendor*" -not -path "./x/vendor*" -not -path "./tests/system/vendor*" -not -path "*.git*" -not -path "./client/lcd/statik/statik.go" | xargs misspell -w - find . -name '*.go' -type f -not -path "./vendor*" -not -path "./x/vendor*" -not -path "./tests/system/vendor*" -not -path "*.git*" -not -path "./client/lcd/statik/statik.go" | xargs gci write --skip-generated -s standard -s default -s "prefix(cosmossdk.io)" -s "prefix(github.com/cosmos/cosmos-sdk)" -s "prefix(github.com/CosmWasm/wasmd)" --custom-order + find . -name '*.go' -type f -not -path "./vendor*" -not -path "./tests/system/vendor*" -not -path "*.git*" -not -path "./client/lcd/statik/statik.go" | xargs gofumpt -w + find . -name '*.go' -type f -not -path "./vendor*" -not -path "./tests/system/vendor*" -not -path "*.git*" -not -path "./client/lcd/statik/statik.go" | xargs misspell -w + find . -name '*.go' -type f -not -path "./vendor*" -not -path "./tests/system/vendor*" -not -path "*.git*" -not -path "./client/lcd/statik/statik.go" | xargs gci write --skip-generated -s standard -s default -s "prefix(cosmossdk.io)" -s "prefix(github.com/cosmos/cosmos-sdk)" -s "prefix(github.com/CosmWasm/wasmd)" --custom-order ############################################################################### diff --git a/benchmarks/app_test.go b/benchmarks/app_test.go index a5bb6ac557..5184710ed2 100644 --- a/benchmarks/app_test.go +++ b/benchmarks/app_test.go @@ -29,11 +29,10 @@ import ( stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" "github.com/CosmWasm/wasmd/app" - wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper" wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types" ) -func setup(db dbm.DB, withGenesis bool, invCheckPeriod uint, opts ...wasmkeeper.Option) (*app.WasmApp, app.GenesisState) { //nolint:unparam +func setup(db dbm.DB, withGenesis bool) (*app.WasmApp, app.GenesisState) { logLevel := log.LevelOption(zerolog.InfoLevel) @@ -48,7 +47,7 @@ func setup(db dbm.DB, withGenesis bool, invCheckPeriod uint, opts ...wasmkeeper. // SetupWithGenesisAccountsAndValSet initializes a new WasmApp with the provided genesis // accounts and possible balances. func SetupWithGenesisAccountsAndValSet(b testing.TB, db dbm.DB, genAccs []authtypes.GenesisAccount, balances ...banktypes.Balance) *app.WasmApp { - wasmApp, genesisState := setup(db, true, 0) + wasmApp, genesisState := setup(db, true) authGenesis := authtypes.NewGenesisState(authtypes.DefaultParams(), genAccs) appCodec := wasmApp.AppCodec() diff --git a/tests/integration/migrations_integration_test.go b/tests/integration/migrations_integration_test.go index 47b756fac0..e5f8020bfa 100644 --- a/tests/integration/migrations_integration_test.go +++ b/tests/integration/migrations_integration_test.go @@ -22,7 +22,7 @@ func TestModuleMigrations(t *testing.T) { wasmApp := app.Setup(t) myAddress := sdk.AccAddress(rand.Bytes(address.Len)) - upgradeHandler := func(ctx sdk.Context, _ upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) { //nolint:unparam + upgradeHandler := func(ctx sdk.Context, _ upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) { return wasmApp.ModuleManager.RunMigrations(ctx, wasmApp.Configurator(), fromVM) } @@ -114,7 +114,7 @@ func TestAccessConfigMigrations(t *testing.T) { wasmApp := app.Setup(t) - upgradeHandler := func(ctx sdk.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) { //nolint:unparam + upgradeHandler := func(ctx sdk.Context, _ upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) { return wasmApp.ModuleManager.RunMigrations(ctx, wasmApp.Configurator(), fromVM) } diff --git a/tests/integration/module_test.go b/tests/integration/module_test.go index 7fe208706f..1155968585 100644 --- a/tests/integration/module_test.go +++ b/tests/integration/module_test.go @@ -581,7 +581,7 @@ func assertCodeList(t *testing.T, q *baseapp.GRPCQueryRouter, ctx sdk.Context, e assert.Equal(t, expectedNum, len(res.CodeInfos)) } -func assertCodeBytes(t *testing.T, q *baseapp.GRPCQueryRouter, ctx sdk.Context, codeID uint64, expectedBytes []byte, marshaler codec.Codec) { //nolint:unparam +func assertCodeBytes(t *testing.T, q *baseapp.GRPCQueryRouter, ctx sdk.Context, codeID uint64, expectedBytes []byte, marshaler codec.Codec) { t.Helper() bz, err := marshaler.Marshal(&types.QueryCodeRequest{CodeId: codeID}) require.NoError(t, err) @@ -601,7 +601,7 @@ func assertCodeBytes(t *testing.T, q *baseapp.GRPCQueryRouter, ctx sdk.Context, assert.Equal(t, expectedBytes, rsp.Data) } -func assertContractList(t *testing.T, q *baseapp.GRPCQueryRouter, ctx sdk.Context, codeID uint64, expContractAddrs []string, marshaler codec.Codec) { //nolint:unparam +func assertContractList(t *testing.T, q *baseapp.GRPCQueryRouter, ctx sdk.Context, codeID uint64, expContractAddrs []string, marshaler codec.Codec) { t.Helper() bz, err := marshaler.Marshal(&types.QueryContractsByCodeRequest{CodeId: codeID}) require.NoError(t, err) @@ -644,7 +644,7 @@ func assertContractState(t *testing.T, q *baseapp.GRPCQueryRouter, ctx sdk.Conte assert.Equal(t, expectedBz, rsp.Data) } -func assertContractInfo(t *testing.T, q *baseapp.GRPCQueryRouter, ctx sdk.Context, contractBech32Addr string, codeID uint64, creator sdk.AccAddress, marshaler codec.Codec) { //nolint:unparam +func assertContractInfo(t *testing.T, q *baseapp.GRPCQueryRouter, ctx sdk.Context, contractBech32Addr string, codeID uint64, creator sdk.AccAddress, marshaler codec.Codec) { t.Helper() bz, err := marshaler.Marshal(&types.QueryContractInfoRequest{Address: contractBech32Addr}) require.NoError(t, err)