From 3733476789da318e4662b6e774497f49ed69d25d Mon Sep 17 00:00:00 2001 From: Jacob Gadikian Date: Sat, 2 Mar 2024 11:43:41 +0200 Subject: [PATCH] bump: golang-ci-lint-action (#974) * Bump golangci/golangci-lint-action from 3 to 4 Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 3 to 4. - [Release notes](https://github.com/golangci/golangci-lint-action/releases) - [Commits](https://github.com/golangci/golangci-lint-action/compare/v3...v4) --- updated-dependencies: - dependency-name: golangci/golangci-lint-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] * update lint action * do the easy stuff first.... --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/golangci-lint.yml | 2 +- .golangci.yml | 1 + app/decorators/change_rate_decorator_test.go | 2 +- app/openapiconsole/console.go | 2 +- cmd/junod/cmd/genica.go | 2 +- cmd/junod/cmd/resets.go | 4 ++-- x/clock/client/cli/query.go | 4 ++-- x/clock/keeper/clock.go | 2 +- x/cw-hooks/client/cli/query.go | 6 +++--- x/feepay/ante/fee_route.go | 2 +- x/feepay/keeper/feepay.go | 2 +- x/feeshare/ante/ante_test.go | 2 +- x/globalfee/client/cli/query.go | 2 +- x/globalfee/querier_test.go | 2 +- x/mint/client/cli/query.go | 8 ++++---- x/tokenfactory/client/cli/query.go | 2 +- x/tokenfactory/simulation/operations.go | 10 +++++----- 17 files changed, 28 insertions(+), 27 deletions(-) diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index 46449b548..1576728ee 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -30,7 +30,7 @@ jobs: - uses: actions/checkout@v4 - name: golangci-lint-junod - uses: golangci/golangci-lint-action@v3 + uses: golangci/golangci-lint-action@v4 with: version: latest args: --timeout 10m diff --git a/.golangci.yml b/.golangci.yml index e5b649883..35ef949a4 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -48,3 +48,4 @@ linters-settings: issues: max-issues-per-linter: 0 + max-same-issues: 0 diff --git a/app/decorators/change_rate_decorator_test.go b/app/decorators/change_rate_decorator_test.go index fb98f1d1e..9da90dd09 100644 --- a/app/decorators/change_rate_decorator_test.go +++ b/app/decorators/change_rate_decorator_test.go @@ -26,7 +26,7 @@ import ( // Define an empty ante handle var ( - EmptyAnte = func(ctx sdk.Context, tx sdk.Tx, simulate bool) (sdk.Context, error) { + EmptyAnte = func(ctx sdk.Context, _ sdk.Tx, _ bool) (sdk.Context, error) { return ctx, nil } ) diff --git a/app/openapiconsole/console.go b/app/openapiconsole/console.go index 465f5bbb5..dd50faadc 100644 --- a/app/openapiconsole/console.go +++ b/app/openapiconsole/console.go @@ -13,7 +13,7 @@ var index embed.FS func Handler(title, specURL string) http.HandlerFunc { t, _ := template.ParseFS(index, "index.tpl") - return func(w http.ResponseWriter, req *http.Request) { + return func(w http.ResponseWriter, _ *http.Request) { t.Execute(w, struct { //nolint:errcheck Title string URL string diff --git a/cmd/junod/cmd/genica.go b/cmd/junod/cmd/genica.go index fe6022061..5b4ea5110 100644 --- a/cmd/junod/cmd/genica.go +++ b/cmd/junod/cmd/genica.go @@ -25,7 +25,7 @@ func AddGenesisIcaCmd(defaultNodeHome string) *cobra.Command { Short: "Add ICA config to genesis.json", Long: `Add default ICA configuration to genesis.json`, Args: cobra.ExactArgs(0), - RunE: func(cmd *cobra.Command, args []string) error { + RunE: func(cmd *cobra.Command, _ []string) error { clientCtx := client.GetClientContextFromCmd(cmd) serverCtx := server.GetServerContextFromCmd(cmd) config := serverCtx.Config diff --git a/cmd/junod/cmd/resets.go b/cmd/junod/cmd/resets.go index 314f53112..d06f9e065 100644 --- a/cmd/junod/cmd/resets.go +++ b/cmd/junod/cmd/resets.go @@ -31,7 +31,7 @@ func ResetCmd() *cobra.Command { var ResetWasmCmd = &cobra.Command{ Use: "wasm", Short: "Reset WASM files", - RunE: func(cmd *cobra.Command, args []string) (err error) { + RunE: func(cmd *cobra.Command, _ []string) (err error) { clientCtx := client.GetClientContextFromCmd(cmd) serverCtx := server.GetServerContextFromCmd(cmd) config := serverCtx.Config @@ -46,7 +46,7 @@ var ResetWasmCmd = &cobra.Command{ var ResetAppCmd = &cobra.Command{ Use: "app", Short: "Reset App files", - RunE: func(cmd *cobra.Command, args []string) (err error) { + RunE: func(cmd *cobra.Command, _ []string) (err error) { clientCtx := client.GetClientContextFromCmd(cmd) serverCtx := server.GetServerContextFromCmd(cmd) config := serverCtx.Config diff --git a/x/clock/client/cli/query.go b/x/clock/client/cli/query.go index 92c39a73f..147a123b4 100644 --- a/x/clock/client/cli/query.go +++ b/x/clock/client/cli/query.go @@ -30,7 +30,7 @@ func GetCmdShowContracts() *cobra.Command { Use: "contracts", Short: "Show addresses of all current clock contracts", Args: cobra.ExactArgs(0), - RunE: func(cmd *cobra.Command, args []string) error { + RunE: func(cmd *cobra.Command, _ []string) error { clientCtx, err := client.GetClientQueryContext(cmd) if err != nil { return err @@ -91,7 +91,7 @@ func GetCmdParams() *cobra.Command { Use: "params", Short: "Show all module params", Args: cobra.ExactArgs(0), - RunE: func(cmd *cobra.Command, args []string) error { + RunE: func(cmd *cobra.Command, _ []string) error { clientCtx, err := client.GetClientQueryContext(cmd) if err != nil { return err diff --git a/x/clock/keeper/clock.go b/x/clock/keeper/clock.go index d646b231c..948a3ad33 100644 --- a/x/clock/keeper/clock.go +++ b/x/clock/keeper/clock.go @@ -97,7 +97,7 @@ func (k Keeper) GetPaginatedContracts(ctx sdk.Context, pag *query.PageRequest) ( k.cdc, store, pag, - func(key []byte, value *types.ClockContract) (*types.ClockContract, error) { + func(_ []byte, value *types.ClockContract) (*types.ClockContract, error) { return value, nil }, func() *types.ClockContract { diff --git a/x/cw-hooks/client/cli/query.go b/x/cw-hooks/client/cli/query.go index 1f6803ed6..cde34e9a5 100644 --- a/x/cw-hooks/client/cli/query.go +++ b/x/cw-hooks/client/cli/query.go @@ -30,7 +30,7 @@ func GetCmdParams() *cobra.Command { Use: "params", Short: "Show all module params", Args: cobra.ExactArgs(0), - RunE: func(cmd *cobra.Command, args []string) error { + RunE: func(cmd *cobra.Command, _ []string) error { clientCtx, err := client.GetClientQueryContext(cmd) if err != nil { return err @@ -54,7 +54,7 @@ func GetStakingContracts() *cobra.Command { Use: "staking-contracts", Short: "Show all staking contracts", Args: cobra.ExactArgs(0), - RunE: func(cmd *cobra.Command, args []string) error { + RunE: func(cmd *cobra.Command, _ []string) error { clientCtx, err := client.GetClientQueryContext(cmd) if err != nil { return err @@ -78,7 +78,7 @@ func GetGovernanceContracts() *cobra.Command { Use: "governance-contracts", Short: "Show all governance contracts", Args: cobra.ExactArgs(0), - RunE: func(cmd *cobra.Command, args []string) error { + RunE: func(cmd *cobra.Command, _ []string) error { clientCtx, err := client.GetClientQueryContext(cmd) if err != nil { return err diff --git a/x/feepay/ante/fee_route.go b/x/feepay/ante/fee_route.go index 4f6181982..4c2e900cf 100644 --- a/x/feepay/ante/fee_route.go +++ b/x/feepay/ante/fee_route.go @@ -31,7 +31,7 @@ func NewFeeRouteDecorator(feePayKeeper feepaykeeper.Keeper, feePayDecorator *Ded // This empty ante is used to call AnteHandles that are not attached // to the main AnteHandler. var ( - EmptyAnte = func(ctx sdk.Context, tx sdk.Tx, simulate bool) (sdk.Context, error) { + EmptyAnte = func(ctx sdk.Context, _ sdk.Tx, _ bool) (sdk.Context, error) { return ctx, nil } ) diff --git a/x/feepay/keeper/feepay.go b/x/feepay/keeper/feepay.go index e4feed9f1..81c1553d5 100644 --- a/x/feepay/keeper/feepay.go +++ b/x/feepay/keeper/feepay.go @@ -48,7 +48,7 @@ func (k Keeper) GetContracts(ctx sdk.Context, pag *query.PageRequest) (*types.Qu k.cdc, store, pag, - func(key []byte, value *types.FeePayContract) (*types.FeePayContract, error) { + func(_ []byte, value *types.FeePayContract) (*types.FeePayContract, error) { return value, nil }, func() *types.FeePayContract { diff --git a/x/feeshare/ante/ante_test.go b/x/feeshare/ante/ante_test.go index 4309415d9..adef92ddc 100644 --- a/x/feeshare/ante/ante_test.go +++ b/x/feeshare/ante/ante_test.go @@ -25,7 +25,7 @@ import ( // Define an empty ante handle var ( - EmptyAnte = func(ctx sdk.Context, tx sdk.Tx, simulate bool) (sdk.Context, error) { + EmptyAnte = func(ctx sdk.Context, _ sdk.Tx, _ bool) (sdk.Context, error) { return ctx, nil } ) diff --git a/x/globalfee/client/cli/query.go b/x/globalfee/client/cli/query.go index 2381472b0..19d4b72be 100644 --- a/x/globalfee/client/cli/query.go +++ b/x/globalfee/client/cli/query.go @@ -30,7 +30,7 @@ func GetCmdShowMinimumGasPrices() *cobra.Command { Long: "Show all minimum gas prices", Aliases: []string{"min"}, Args: cobra.ExactArgs(0), - RunE: func(cmd *cobra.Command, args []string) error { + RunE: func(cmd *cobra.Command, _ []string) error { clientCtx, err := client.GetClientQueryContext(cmd) if err != nil { return err diff --git a/x/globalfee/querier_test.go b/x/globalfee/querier_test.go index 5f8116d9b..aee9175e8 100644 --- a/x/globalfee/querier_test.go +++ b/x/globalfee/querier_test.go @@ -42,7 +42,7 @@ func TestQueryMinimumGasPrices(t *testing.T) { }, }, "no param set": { - setupStore: func(ctx sdk.Context, k globalfeekeeper.Keeper) { + setupStore: func(_ sdk.Context, _ globalfeekeeper.Keeper) { }, }, } diff --git a/x/mint/client/cli/query.go b/x/mint/client/cli/query.go index 4b8040188..06740ae79 100644 --- a/x/mint/client/cli/query.go +++ b/x/mint/client/cli/query.go @@ -38,7 +38,7 @@ func GetCmdQueryParams() *cobra.Command { Use: "params", Short: "Query the current minting parameters", Args: cobra.NoArgs, - RunE: func(cmd *cobra.Command, args []string) error { + RunE: func(cmd *cobra.Command, _ []string) error { clientCtx, err := client.GetClientQueryContext(cmd) if err != nil { return err @@ -67,7 +67,7 @@ func GetCmdQueryInflation() *cobra.Command { Use: "inflation", Short: "Query the current minting inflation value", Args: cobra.NoArgs, - RunE: func(cmd *cobra.Command, args []string) error { + RunE: func(cmd *cobra.Command, _ []string) error { clientCtx, err := client.GetClientQueryContext(cmd) if err != nil { return err @@ -96,7 +96,7 @@ func GetCmdQueryAnnualProvisions() *cobra.Command { Use: "annual-provisions", Short: "Query the current minting annual provisions value", Args: cobra.NoArgs, - RunE: func(cmd *cobra.Command, args []string) error { + RunE: func(cmd *cobra.Command, _ []string) error { clientCtx, err := client.GetClientQueryContext(cmd) if err != nil { return err @@ -124,7 +124,7 @@ func GetCmqQueryTargetSupply() *cobra.Command { Use: "target-supply", Short: "Query the current target supply for this phase value", Args: cobra.NoArgs, - RunE: func(cmd *cobra.Command, args []string) error { + RunE: func(cmd *cobra.Command, _ []string) error { clientCtx, err := client.GetClientQueryContext(cmd) if err != nil { return err diff --git a/x/tokenfactory/client/cli/query.go b/x/tokenfactory/client/cli/query.go index 1729a83a0..9beb680e4 100644 --- a/x/tokenfactory/client/cli/query.go +++ b/x/tokenfactory/client/cli/query.go @@ -37,7 +37,7 @@ func GetParams() *cobra.Command { Use: "params [flags]", Short: "Get the params for the x/tokenfactory module", Args: cobra.ExactArgs(0), - RunE: func(cmd *cobra.Command, args []string) error { + RunE: func(cmd *cobra.Command, _ []string) error { clientCtx, err := client.GetClientQueryContext(cmd) if err != nil { return err diff --git a/x/tokenfactory/simulation/operations.go b/x/tokenfactory/simulation/operations.go index 9b3bef852..f4d1ca8a0 100644 --- a/x/tokenfactory/simulation/operations.go +++ b/x/tokenfactory/simulation/operations.go @@ -156,7 +156,7 @@ func SimulateMsgSetDenomMetadata( app *baseapp.BaseApp, ctx sdk.Context, accs []simtypes.Account, - chainID string, + _ string, ) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { // Get create denom account createdDenomAccount, _ := simtypes.RandomAcc(r, accs) @@ -210,7 +210,7 @@ func SimulateMsgChangeAdmin( app *baseapp.BaseApp, ctx sdk.Context, accs []simtypes.Account, - chainID string, + _ string, ) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { // Get create denom account createdDenomAccount, _ := simtypes.RandomAcc(r, accs) @@ -260,7 +260,7 @@ func SimulateMsgBurn( app *baseapp.BaseApp, ctx sdk.Context, accs []simtypes.Account, - chainID string, + _ string, ) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { // Get create denom account createdDenomAccount, _ := simtypes.RandomAcc(r, accs) @@ -314,7 +314,7 @@ func SimulateMsgMint( app *baseapp.BaseApp, ctx sdk.Context, accs []simtypes.Account, - chainID string, + _ string, ) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { // Get create denom account createdDenomAccount, _ := simtypes.RandomAcc(r, accs) @@ -356,7 +356,7 @@ func SimulateMsgCreateDenom(tfKeeper TokenfactoryKeeper, ak types.AccountKeeper, app *baseapp.BaseApp, ctx sdk.Context, accs []simtypes.Account, - chainID string, + _ string, ) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { // Get sims account simAccount, _ := simtypes.RandomAcc(r, accs)