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

introduce an import style convention #138

Closed
akiezun opened this issue Jan 22, 2015 · 6 comments
Closed

introduce an import style convention #138

akiezun opened this issue Jan 22, 2015 · 6 comments
Labels

Comments

@akiezun
Copy link
Contributor

akiezun commented Jan 22, 2015

without an import style convention, many commits include edits that change full imports to star (*) back and forth.

I vote for full name imports everywhere, it's easy to collapse them in the editor.

@mattsooknah
Copy link
Contributor

I agree w/ Adam. Full names are more specific, avoid namespace collisions, and (depending on package sizes) could reduce compile time a bit (maybe insignificant for us though).

@lbergelson
Copy link
Member

I don't feel strongly either way. I'm fine with full imports.

@lbergelson
Copy link
Member

By default it looks like intellij switches to import a package with * when 5 or more classes from the same package are imported. You can change it to an arbitrary number in preference->editor->codes style-> java->imports

Do we want to set it higher? The only issue I see is that 50% of our code is going to be import java.utils lines. You can also specify specific packages to import with *, we could import all on java standard library and import specifically when using external libraries.

@droazen
Copy link
Contributor

droazen commented Jan 22, 2015

I vote for collapsing after 5 or more -- full imports would clutter the diffs during code review. Also, gains in compile time are likely to not be noticeable.

@droazen
Copy link
Contributor

droazen commented Jan 22, 2015

Brain not fully working when I wrote the above -- of course both options clutter the diffs in different ways :)

@droazen
Copy link
Contributor

droazen commented Feb 25, 2015

This is done -- we've standardized on collapsing after 5 or more.

@droazen droazen closed this as completed Feb 25, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants