Skip to content
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

Merged
merged 5 commits into from
Sep 15, 2023
Merged

finish linting #568

merged 5 commits into from
Sep 15, 2023

Conversation

faddat
Copy link
Contributor

@faddat faddat commented Sep 15, 2023

1. Summary

Resolves all linter issues

closes: #550

2.Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

3. Implementation details

Resolve all linter issues

@codecov
Copy link

codecov bot commented Sep 15, 2023

Codecov Report

Merging #568 (f288771) into main (2ece5ef) will increase coverage by 0.00%.
The diff coverage is 45.45%.

Impacted file tree graph

@@           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           
Flag Coverage Δ
unittests 13.19% <45.45%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Changed Coverage Δ
cmd/quicksilverd/bulk_airdrop.go 9.63% <0.00%> (-0.14%) ⬇️
x/airdrop/types/msgs.go 69.44% <ø> (ø)
x/interchainstaking/keeper/ibc_packet_handlers.go 41.70% <ø> (ø)
x/interchainstaking/keeper/withdrawal_record.go 82.87% <ø> (ø)
x/mint/simulation/genesis.go 0.00% <ø> (ø)
x/participationrewards/keeper/protocol_data.go 82.75% <ø> (ø)
test/simulation/config.go 56.41% <100.00%> (ø)
x/interchainstaking/keeper/redemptions.go 74.76% <100.00%> (+0.35%) ⬆️

@faddat faddat merged commit 9be83fa into main Sep 15, 2023
// add unallocated dust.
msgs[0].Amount = msgs[0].Amount.AddAmount(outstanding)
// Ensure there are messages to process
if len(msgs) > 0 {
Copy link
Contributor

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
Copy link
Contributor

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
Copy link
Contributor

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?

@faddat
Copy link
Contributor Author

faddat commented Sep 15, 2023

Will re-address tomorrow.

Thanks for the review, @ThanhNhann

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

lint exactly like ibc
3 participants