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

chore: sdk.Int to math.Int #12132

Merged
merged 11 commits into from
Jun 3, 2022
Merged

Conversation

faddat
Copy link
Contributor

@faddat faddat commented Jun 3, 2022

Description

When locally working with golangci-lint, we can see that there were many deprecation warnings about sdk.Int. This PR resolves that and makes 1-2 other linting related changes. Issue on linting coming next.

This also moves BitCurve to bitCurve.

I expect that this set of changes will require several pull requests, one of them to the settings for the linter.

It also does a gofumpt, because we had various formatting-related linters fail, too.


Author Checklist

All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.

I have...

  • included the correct type prefix in the PR title
  • added ! to the type prefix if API or client breaking change
  • targeted the correct branch (see PR Targeting)
  • provided a link to the relevant issue or specification
  • followed the guidelines for building modules
  • included the necessary unit and integration tests
  • added a changelog entry to CHANGELOG.md
  • included comments for documenting Go code
  • updated the relevant documentation or specification
  • reviewed "Files changed" and left comments if necessary
  • confirmed all CI checks have passed

Reviewers Checklist

All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.

I have...

  • confirmed the correct type prefix in the PR title
  • confirmed ! in the type prefix if API or client breaking change
  • confirmed all author checklist items have been addressed
  • reviewed state machine logic
  • reviewed API design and naming
  • reviewed documentation is accurate
  • reviewed tests and test coverage
  • manually tested (if applicable)

@faddat faddat requested a review from a team as a code owner June 3, 2022 08:27
@faddat faddat changed the title Linting: sdk.Int to math.Int Chore: sdk.Int to math.Int Jun 3, 2022
@faddat faddat changed the title Chore: sdk.Int to math.Int chore: sdk.Int to math.Int Jun 3, 2022
@faddat faddat mentioned this pull request Jun 3, 2022
4 tasks
@codecov
Copy link

codecov bot commented Jun 3, 2022

Codecov Report

Merging #12132 (237e36f) into main (889dfcb) will increase coverage by 0.33%.
The diff coverage is 56.73%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main   #12132      +/-   ##
==========================================
+ Coverage   66.04%   66.38%   +0.33%     
==========================================
  Files         671      686      +15     
  Lines       71055    72102    +1047     
==========================================
+ Hits        46927    47863     +936     
- Misses      21465    21543      +78     
- Partials     2663     2696      +33     
Impacted Files Coverage Δ
baseapp/baseapp.go 79.27% <ø> (ø)
client/cmd.go 57.73% <0.00%> (ø)
client/grpc_query.go 30.33% <0.00%> (ø)
client/keys/add.go 63.34% <0.00%> (ø)
core/appconfig/config.go 80.95% <ø> (ø)
pruning/manager.go 95.18% <ø> (ø)
server/mock/tx.go 63.15% <ø> (ø)
server/rosetta/converter.go 56.28% <0.00%> (ø)
simapp/test_helpers.go 26.34% <0.00%> (ø)
testutil/network/network.go 62.40% <ø> (ø)
... and 62 more

@faddat
Copy link
Contributor Author

faddat commented Jun 3, 2022

codecov is a red herring factory.

Copy link
Member

@julienrbrt julienrbrt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great clean up, thanks! Just one comment.

.golangci.yml Outdated Show resolved Hide resolved
store/v2alpha1/smt/ics23.go Show resolved Hide resolved
@faddat
Copy link
Contributor Author

faddat commented Jun 3, 2022

When this PR is merged, all of the other PR's in the linting series of PR's should also become easier to review.

Thanks @julienrbrt

simapp/test_helpers.go Outdated Show resolved Hide resolved
Copy link
Member

@tac0turtle tac0turtle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, left one comment on import grouping

@julienrbrt julienrbrt added the A:automerge Automatically merge PR once all prerequisites pass. label Jun 3, 2022
@mergify mergify bot merged commit 78e2e35 into cosmos:main Jun 3, 2022
@ValarDragon
Copy link
Contributor

Wait no, why did we apply changes to the secp curve code? That should not be changed, its a copy of code elsewhere, that we do not changed. (Its a valid question if it should be its own repo)

But applying lint changes to it does not seem like a good idea imo, adds noise to diffs against upstream.

@julienrbrt
Copy link
Member

Wait no, why did we apply changes to the secp curve code? That should not be changed, its a copy of code elsewhere, that we do not changed. (Its a valid question if it should be its own repo)

But applying lint changes to it does not seem like a good idea imo, adds noise to diffs against upstream.

Good point, but it does add noise to the tooling to specifically ignore that file 🤷🏾‍♂️
Maybe its own repo is overkill, but it does make sense if it should be a read-only file.
cc @marbar3778

larry0x pushed a commit to larry0x/cosmos-sdk that referenced this pull request May 22, 2023
## Description

When locally working with golangci-lint, we can see that there were many deprecation warnings about sdk.Int.  This PR resolves that and makes 1-2 other linting related changes.  Issue on linting coming next.

This also moves BitCurve to bitCurve.

I expect that this set of changes will require several pull requests, one of them to the settings for the linter. 

It also does a gofumpt, because we had various formatting-related linters fail, too. 


---

### Author Checklist

*All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.*

I have...

- [x] included the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title
- [ ] added `!` to the type prefix if API or client breaking change
- [x] targeted the correct branch (see [PR Targeting](https://github.com/cosmos/cosmos-sdk/blob/main/CONTRIBUTING.md#pr-targeting))
- [x] provided a link to the relevant issue or specification
- [ ] followed the guidelines for [building modules](https://github.com/cosmos/cosmos-sdk/blob/main/docs/building-modules)
- [ ] included the necessary unit and integration [tests](https://github.com/cosmos/cosmos-sdk/blob/main/CONTRIBUTING.md#testing)
- [x] added a changelog entry to `CHANGELOG.md`
- [ ] included comments for [documenting Go code](https://blog.golang.org/godoc)
- [ ] updated the relevant documentation or specification
- [x] reviewed "Files changed" and left comments if necessary
- [x] confirmed all CI checks have passed

### Reviewers Checklist

*All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.*

I have...

- [ ] confirmed the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title
- [ ] confirmed `!` in the type prefix if API or client breaking change
- [ ] confirmed all author checklist items have been addressed 
- [ ] reviewed state machine logic
- [ ] reviewed API design and naming
- [ ] reviewed documentation is accurate
- [ ] reviewed tests and test coverage
- [ ] manually tested (if applicable)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants