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

wiki: CodeReviewComments change: Discourage duplicate imports with different names #29289

Open
markusthoemmes opened this issue Dec 16, 2018 · 2 comments

Comments

@markusthoemmes
Copy link

commented Dec 16, 2018

I've seen it happen a couple of times (especially in Kubernetes related projects with lots of naming collisions) that the same packages have been imported multiple times with different aliases. My gut feeling was, that golint should warn me about this, so I can take the appropriate steps without having to manually check for that condition.

Turns out there was a proposed PR to do that, but it's been closed because it was out of scope. The CodeReviewComments indeed do not contain a mention of this condition. Should we add it?

I feel like a simple "Do not import the same package twice under a different alias." or even a softer "Avoid importing the same package under a different alias." would be reasonable and thus pulling such a change to golint in scope.

@bcmills

This comment has been minimized.

Copy link
Member

commented Dec 19, 2018

@markusthoemmes

This comment has been minimized.

Copy link
Author

commented Jul 9, 2019

Friendly poke 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.