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

linting: use gci to sort imports #3887

Merged
merged 7 commits into from
Jun 20, 2023
Merged

Conversation

faddat
Copy link
Contributor

@faddat faddat commented Jun 18, 2023

Description

This PR only adds gci to ibc-go, so that we can sort imports with ease.

Commit Message / Changelog Entry

chore: add gci to ibc-go

see the guidelines for commit messages. (view raw markdown for examples)


Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.

  • Targeted PR against correct branch (see CONTRIBUTING.md).
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • Code follows the module structure standards and Go style guide.
  • Wrote unit and integration tests.
  • Updated relevant documentation (docs/) or specification (x/<module>/spec/).
  • Added relevant godoc comments.
  • Provide a commit message to be used for the changelog entry in the PR description for review.
  • Re-reviewed Files changed in the Github PR explorer.
  • Review Codecov Report in the comment section below once CI passes.

@faddat faddat force-pushed the faddat/second-gci branch from 5b67512 to 12da89b Compare June 18, 2023 17:12
@faddat faddat mentioned this pull request Jun 18, 2023
9 tasks
@charleenfei charleenfei added the type: code hygiene Clean up code but without changing functionality or interfaces label Jun 19, 2023
@faddat
Copy link
Contributor Author

faddat commented Jun 19, 2023

Note: I could refactor this in the same manner that I did the sdk, if desired:

cosmos/cosmos-sdk#16605

@crodriguezvega crodriguezvega requested a review from srdtrk as a code owner June 19, 2023 18:01
Copy link
Contributor

@crodriguezvega crodriguezvega left a comment

Choose a reason for hiding this comment

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

I have to admit I haven't checked every single file, but I trust the linter to do its job. :)

Thank you, @faddat. It's nice to finally have a linter to end all import grouping/ordering wars. :D

I updated the Go style guide to recommend readers to run make lint-fix.

@crodriguezvega
Copy link
Contributor

Note: I could refactor this in the same manner that I did the sdk, if desired:

cosmos/cosmos-sdk#16605

I am personally not strongly opinionated: to me this grouping works fine. If others think some tweaking is needed, I will be also fine with it.

@crodriguezvega crodriguezvega changed the title use gci to sort imports linting: use gci to sort imports Jun 19, 2023
@faddat
Copy link
Contributor Author

faddat commented Jun 19, 2023

I'm good with either, as well :)

Copy link
Contributor

@DimitrisJim DimitrisJim left a comment

Choose a reason for hiding this comment

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

looks good to me

Copy link
Contributor

@chatton chatton left a comment

Choose a reason for hiding this comment

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

LGTM

@crodriguezvega crodriguezvega merged commit 39adb01 into cosmos:main Jun 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: code hygiene Clean up code but without changing functionality or interfaces
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants