-
Notifications
You must be signed in to change notification settings - Fork 61
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
finish linting #568
finish linting #568
Conversation
Codecov Report
@@ Coverage Diff @@
## main #568 +/- ##
=======================================
Coverage 13.19% 13.19%
=======================================
Files 243 243
Lines 62942 62948 +6
=======================================
+ Hits 8306 8309 +3
- Misses 53967 53970 +3
Partials 669 669
Flags with carried forward coverage won't be shown. Click here to find out more.
|
// add unallocated dust. | ||
msgs[0].Amount = msgs[0].Amount.AddAmount(outstanding) | ||
// Ensure there are messages to process | ||
if len(msgs) > 0 { |
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.
I think we don't need to check the len(msgs)
here because it always > 0 if the code can run here, just need to add //nolint:gosec
to pass the lint
@@ -294,7 +294,7 @@ func (suite *KeeperTestSuite) TestCalcDistributionScores() { | |||
validators := appA.InterchainstakingKeeper.GetValidators(ctx, zone.ChainId) | |||
for i := range validators { | |||
validators[i].VotingPower = sdk.NewInt(0) | |||
appA.InterchainstakingKeeper.SetValidator(ctx, zone.ChainId, validators[i]) | |||
appA.InterchainstakingKeeper.SetValidator(ctx, zone.ChainId, validators[i]) //nolint:errcheck // ignore 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.
Why we don't check the error here
@@ -329,7 +329,7 @@ func (suite *KeeperTestSuite) TestCalcDistributionScores() { | |||
|
|||
for i, val := range appA.InterchainstakingKeeper.GetValidators(ctx, zone.ChainId) { | |||
val.VotingPower = sdk.NewInt(int64(10 + i*10)) | |||
appA.InterchainstakingKeeper.SetValidator(ctx, zone.ChainId, val) | |||
appA.InterchainstakingKeeper.SetValidator(ctx, zone.ChainId, val) //nolint:errcheck // ignore 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.
Same above, why we don't check the error for this?
Will re-address tomorrow. Thanks for the review, @ThanhNhann |
1. Summary
Resolves all linter issues
closes: #550
2.Type of change
3. Implementation details
Resolve all linter issues