Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
kien6034 committed Dec 5, 2024
1 parent bc72db4 commit a411525
Show file tree
Hide file tree
Showing 10 changed files with 9 additions and 32 deletions.
2 changes: 1 addition & 1 deletion app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ func init() {

// NewTerraApp returns a reference to an initialized TerraApp.
func NewTerraApp(
logger log.Logger, db dbm.DB, traceStore io.Writer, loadLatest bool, skipUpgradeHeights map[int64]bool,
logger log.Logger, db dbm.DB, _ io.Writer, loadLatest bool, skipUpgradeHeights map[int64]bool,
homePath string, encodingConfig terraappparams.EncodingConfig, appOpts servertypes.AppOptions,
wasmOpts []wasmkeeper.Option, baseAppOptions ...func(*baseapp.BaseApp),
) *TerraApp {
Expand Down
1 change: 0 additions & 1 deletion app/upgrades/v11/constants.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
//nolint:revive
package v11

import (
Expand Down
2 changes: 1 addition & 1 deletion server/middleware_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
)

// Dummy handler for testing
func dummyHandler(w http.ResponseWriter, r *http.Request) {
func dummyHandler(w http.ResponseWriter, _ *http.Request) {
w.WriteHeader(http.StatusOK)
w.Write([]byte("OK"))
}
Expand Down
6 changes: 1 addition & 5 deletions tests/e2e/configurer/base.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,7 @@ func (bc *baseConfigurer) RunIBC() error {
return err
}
bc.t.Log("Run relayer 2 between chain b and chain a")
if err := bc.runIBCRelayer(bc.chainConfigs[1], bc.chainConfigs[0], containers.HermesContainerName2); err != nil {
return err
}

return nil
return bc.runIBCRelayer(bc.chainConfigs[1], bc.chainConfigs[0], containers.HermesContainerName2)
}

func (bc *baseConfigurer) runIBCRelayer(chainConfigA *chain.Config, chainConfigB *chain.Config, hermesContainerName string) error {
Expand Down
6 changes: 1 addition & 5 deletions tests/e2e/configurer/chain/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,7 @@ func (n *NodeConfig) Run() error {
"Terra node failed to produce blocks",
)

if err := n.extractOperatorAddressIfValidator(); err != nil {
return err
}

return nil
return n.extractOperatorAddressIfValidator()
}

// Stop stops the node from running and removes its container.
Expand Down
11 changes: 2 additions & 9 deletions tests/e2e/configurer/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@ package configurer
type setupFn func(configurer Configurer) error

func baseSetup(configurer Configurer) error {
if err := configurer.RunValidators(); err != nil {
return err
}
return nil
return configurer.RunValidators()
}

func withIBC(setupHandler setupFn) setupFn {
Expand All @@ -15,10 +12,6 @@ func withIBC(setupHandler setupFn) setupFn {
return err
}

if err := configurer.RunIBC(); err != nil {
return err
}

return nil
return configurer.RunIBC()
}
}
5 changes: 1 addition & 4 deletions tests/e2e/containers/containers.go
Original file line number Diff line number Diff line change
Expand Up @@ -451,10 +451,7 @@ func (m *Manager) ClearResources() error {
}
}

if err := m.pool.RemoveNetwork(m.network); err != nil {
return err
}
return nil
return m.pool.RemoveNetwork(m.network)
}

func noRestart(config *docker.HostConfig) {
Expand Down
2 changes: 1 addition & 1 deletion x/tax/handlers/wasm_msg_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ type WasmMsgServer struct {
messageServer wasmtypes.MsgServer
}

func NewWasmMsgServer(wasmKeeper wasmkeeper.Keeper, treasuryKeeper treasurykeeper.Keeper, taxKeeper taxkeeper.Keeper, bankKeeper bankkeeper.Keeper, messageServer wasmtypes.MsgServer) wasmtypes.MsgServer {
func NewWasmMsgServer(wasmKeeper wasmkeeper.Keeper, treasuryKeeper treasurykeeper.Keeper, taxKeeper taxkeeper.Keeper, bankKeeper bankkeeper.Keeper, _ wasmtypes.MsgServer) wasmtypes.MsgServer {
return &WasmMsgServer{
taxKeeper: taxKeeper,
wasmKeeper: wasmKeeper,
Expand Down
5 changes: 1 addition & 4 deletions x/tax/types/genesis.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,5 @@ func DefaultGenesisState() *GenesisState {
// Validate performs basic genesis state validation returning an error upon any
// failure.
func (gs GenesisState) Validate() error {
if err := gs.Params.Validate(); err != nil {
return err
}
return nil
return gs.Params.Validate()
}
1 change: 0 additions & 1 deletion x/treasury/keeper/test_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,6 @@ func NewTestMsgCreateValidator(address sdk.ValAddress, pubKey cryptotypes.PubKey
return msg
}

// nolint: unused
func setupValidators(t *testing.T) (TestInput, stakingtypes.MsgServer) {
input := CreateTestInput(t)
stakingMsgSvr := stakingkeeper.NewMsgServerImpl(input.StakingKeeper)
Expand Down

0 comments on commit a411525

Please sign in to comment.