-
Notifications
You must be signed in to change notification settings - Fork 607
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
lint: enable unused in golangci-lint #1939
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODOs to keep track of once this PR is accepted
@@ -95,5 +95,12 @@ issues: | |||
- path: client/docs | |||
linters: | |||
- all | |||
- path: x/gamm/pool-models/stableswap | |||
linters: | |||
# Stableswap is in development. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO: add issue reminding to re-enable this
x/gamm/keeper/msg_server.go
Outdated
sdk.NewAttribute(sdk.AttributeKeySender, msg.Sender), | ||
), | ||
}) | ||
server.keeper.createAddLiquidityEvent(ctx, sender, msg.PoolId, addedLiquidity) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets please separate out lint PRs from functionality changes / more detailed refactors like this
@@ -61,6 +61,7 @@ func NewKeeper(cdc codec.BinaryCodec, storeKey sdk.StoreKey, paramSpace paramtyp | |||
} | |||
} | |||
|
|||
// nolint: unused | |||
func (k *Keeper) createSwapEvent(ctx sdk.Context, sender sdk.AccAddress, poolId uint64, input sdk.Coins, output sdk.Coins) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO: re-enable missing events
Strong support of this :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
accountKeeper stakingtypes.AccountKeeper | ||
bankKeeper stakingtypes.BankKeeper |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah good catch that this was caught
Follow-up to: #1897
What is the purpose of the change
We would like to improve the quality of our codebase by trying out components of the staticcheck linter.
This change introduced
unused
- 1st of the 4 componentsAlthough, we added
deadcode
linter in #1934,unused
seems to be detecting more unused logic.In addition to removing the unused code, the following was done:
unused
anddeadcode
forx/gamm/pool-models/stableswap
since it is currently in developmentDocumentation and Release Note
Unreleased
section inCHANGELOG.md
? no