-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
style: add gci linter #16605
style: add gci linter #16605
Conversation
Wow that's an awesome linter!! |
Can you make CI happy? One file isn't gofumped it says. |
happy to :) |
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.
Amazing find!! This needs further refinement the way we do it in the sdk and is recommended is to group third party imports and group self imports. This adds multiple sections and chnages what developers should do
I think that this eliminates the developer work, other than running make lint-fix before pushing, eliminating the need for developers to know what to do, other than to run make lint-fix before making a PR. If you've got ideas as to how to restructure the grouping though, I'm all ears :). I view this as part of: And the results are tangible here: So you'd like to see cosmossdk.io grouped with github.com/cosmos/cosmos-sdk? |
I think it is just: std, default, cosmossdk.io, cosmos/cosmos-sdk. |
Any better? cool part here is that was one command :). Quite happy to work it into whatever form that's needed. |
I think you need to re-run that and we can merge. |
ah, sure thing :). I'll fix conflicts and re-run now. |
Thanks! Orm tests aren't failing because of your PR, so checking.... |
that is wierd... I'll merge in main and try again. It should change nothing? (I think?) |
Feel free to merge main, that test is flaky: #16655. |
Head branch was pushed to by a user without write access
I will backport this to v0.50.x, otherwise when we backport features to v0.50 we keep getting import conflicts (while v0.50 is at this point equivalent to main). |
closes: #16606
Description
This PR sorts the imports to the SDK deterministically.
review:
The PR itself is 100% reproducible, just run make lint-fix :)
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...
!
to the type prefix if API or client breaking changeCHANGELOG.md
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...
!
in the type prefix if API or client breaking change