Skip to content

Commit

Permalink
test: fix linter
Browse files Browse the repository at this point in the history
  • Loading branch information
snobbee committed Nov 6, 2023
1 parent 7c5ed10 commit 4276cd2
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 19 deletions.
30 changes: 17 additions & 13 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,32 @@ run:
linters:
enable:
- bodyclose
- deadcode
- depguard
# WARN [runner] The linter 'deadcode' is deprecated (since v1.49.0) due to: The owner seems to have abandoned the linter. Replaced by unused.
# - deadcode
# x/tokenregistry/client/cli/query.go:9:2: import 'github.com/cosmos/cosmos-sdk/client' is not allowed from list 'Main' (depguard)
# - depguard
- dogsled
- goconst
# - gocritic
# - gofmt
# - goimports
# - golint
- revive
# - gocritic
# - gofmt
# - goimports
# - golint
# x/clp/client/cli/query.go:49:17: unused-parameter: parameter 'queryRoute' seems to be unused, consider removing or renaming it as _ (revive)
# - revive
- gosec
- govet
- ineffassign
# - interfacer
# this is deprecated/obsolete
# - maligned
# - interfacer
# this is deprecated/obsolete
# - maligned
- misspell
- nakedret
- prealloc
# - scopelint
# - scopelint
- exportloopref
- staticcheck
- structcheck
# WARN [runner] The linter 'structcheck' is deprecated (since v1.49.0) due to: The owner seems to have abandoned the linter. Replaced by unused.
# - structcheck
- stylecheck
- typecheck
- unconvert
Expand Down Expand Up @@ -63,7 +67,7 @@ issues:
- ineffassign
- prealloc
- staticcheck
# Not a real issue here, so ignore
# Not a real issue here, so ignore
- path: x/clp/keeper/pureCalculation_test.go
text: "G113:"
linters:
Expand Down
8 changes: 4 additions & 4 deletions integrationtest/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -390,10 +390,10 @@ func TestIntegration(t *testing.T) {
return genesisState
})

app.ClpKeeper.SetRewardParams(ctx, &tc.Setup.RewardsParams)
app.ClpKeeper.SetLiquidityProtectionParams(ctx, &tc.Setup.ProtectionParams)
app.ClpKeeper.SetPmtpParams(ctx, &tc.Setup.ShiftingParams)
app.ClpKeeper.SetProviderDistributionParams(ctx, &tc.Setup.ProviderParams)
app.ClpKeeper.SetRewardParams(ctx, &tc.Setup.RewardsParams) //nolint
app.ClpKeeper.SetLiquidityProtectionParams(ctx, &tc.Setup.ProtectionParams) //nolint
app.ClpKeeper.SetPmtpParams(ctx, &tc.Setup.ShiftingParams) //nolint
app.ClpKeeper.SetProviderDistributionParams(ctx, &tc.Setup.ProviderParams) //nolint

clpSrv := clpkeeper.NewMsgServerImpl(app.ClpKeeper)
marginSrv := marginkeeper.NewMsgServerImpl(app.MarginKeeper)
Expand Down
2 changes: 1 addition & 1 deletion x/clp/client/cli/query_rewards_bucket_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ func TestShowRewardsBucket(t *testing.T) {
require.NoError(t, net.Config.Codec.UnmarshalJSON(out.Bytes(), &resp))
require.NotNil(t, resp.RewardsBucket)
require.Equal(t,
nullify.Fill(&tc.obj),
nullify.Fill(&tc.obj), //nolint
nullify.Fill(&resp.RewardsBucket),
)
}
Expand Down
2 changes: 1 addition & 1 deletion x/clp/keeper/rewards_bucket_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ func TestRewardsBucketGet(t *testing.T) {
)
require.True(t, found)
require.Equal(t,
nullify.Fill(&item),
nullify.Fill(&item), //nolint
nullify.Fill(&rst),
)
}
Expand Down

0 comments on commit 4276cd2

Please sign in to comment.