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(imports): Group local packages together #552

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

kakkoyun
Copy link
Member

@kakkoyun kakkoyun commented Feb 21, 2025

goimports has mode to group local imports together. Somehow this triggered my OCD 😅
This is marked as draft to test the waters. Feel free to reject.

Signed-off-by: Kemal Akkoyun [email protected]

@kakkoyun kakkoyun requested a review from a team as a code owner February 21, 2025 15:47
@kakkoyun kakkoyun marked this pull request as draft February 21, 2025 15:47
@github-actions github-actions bot added the conventional-commit/chore Maintenance work that does not show up in the release notes label Feb 21, 2025
Copy link
Contributor

@RomainMuller RomainMuller left a comment

Choose a reason for hiding this comment

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

I personally don't see any benefits to adding a blank line between "local" and "not" package since they are sorted alphanumerically, so I can easily find an import or absence thereof without having the cognitive load to devise if this is repo-local or not... I am also partial to how my IDE behaves by default... because anything else is potentially additional barrier to contributions...

That said, I dont feel strongly enough on this subject to go all BDFL on this and impose my views... so I'll wait for more feedback on this proposal before deciding.

@kakkoyun
Copy link
Member Author

I am also partial to how my IDE behaves by default... because anything else is potentially additional barrier to contributions...

If you IDE support, golangci-lint config this should be automatic. Most of the IDEs, familiar with goimports settings.

That said, I dont feel strongly enough on this subject to go all BDFL on this and impose my views... so I'll wait for more feedback on this proposal before deciding.

👍 😊 I'm not attach to the idea at all. Let's see what others think.

When it comes to automated static checks I'm a maximalist (if they are not slow), enable them all! :trollface:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conventional-commit/chore Maintenance work that does not show up in the release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants