-
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 stylecheck #1960
lint: enable stylecheck #1960
Conversation
Anecdotally, it feels that this linter caused the largest increase in time it takes to run However, it does seem that it was helpful in enforcing consistency so might still be worth trying it. I think it should be another candidate to be potentially removed if linter times become a problem. Instead, we can run it every now and then to clean up the codebase |
On another look, seems I was wrong - the difference was likely due to cache. After timing these again:
Going to leave this here still in case anyone has thoughts |
@@ -196,59 +196,59 @@ func (pa Pool) CalcInAmtGivenOut(ctx sdk.Context, tokenOut sdk.Coins, tokenInDen | |||
return sdk.NewCoin(tokenInDenom, tokenInAmt), nil | |||
} | |||
|
|||
func (pa *Pool) SwapInAmtGivenOut(ctx sdk.Context, tokenOut sdk.Coins, tokenInDenom string, swapFee sdk.Dec) (tokenIn sdk.Coin, err error) { | |||
tokenIn, err = pa.CalcInAmtGivenOut(ctx, tokenOut, tokenInDenom, swapFee) | |||
func (p *Pool) SwapInAmtGivenOut(ctx sdk.Context, tokenOut sdk.Coins, tokenInDenom string, swapFee sdk.Dec) (tokenIn sdk.Coin, err error) { |
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.
yay pa -> p !
doesn't seem like a big increase in time / a big overhead just from the stats roman provided |
Closes: #XXX
What is the purpose of the change
Follow-up to: #1897
Linter that enforces style rules. A subset of rules from the staticcheck binary.
Brief Changelog
Testing and Verifying
This change is a trivial rework / code cleanup without any test coverage.
Documentation and Release Note
Unreleased
section inCHANGELOG.md
? no