I think we should strive to make the signal-to-noise ratio of our diffs as high as possible, while at the same time enforce a certain level of uniformity. Besides, we already have a bunch of conventions for imports in checkstyle.xml, so this is straightforward. IDEA (and I'm pretty sure Eclipse too) can organize your imports given a set of rules, and there are also Checkstyle plugins that run checks while you're coding.
On 6/30/12 6:43 AM, "Jakob Homan" <[email protected]> wrote: >My thought is that after reviewing a lot of patches, I honestly don't >care about the imports... If your IDE can do something sensible with >them, that's great. But they have no effect on the code or add any >extra effort to the code reviews. > > >On Fri, Jun 29, 2012 at 10:34 PM, Avery Ching <[email protected]> wrote: >> It's not silly at all. I suggest that we add some checkstyle rules for >> enforcing our convention as well. >> >> http://checkstyle.sourceforge.net/config_imports.html >> >> I like AvoidStarImport, RedundantImport, UnusedImports, and (most >>related to >> this question) ImportOrder. >> >> Any thoughts? >> >> Avery >> >> On 6/29/12 8:23 AM, Alessandro Presta wrote: >>> >>> Hi all, >>> >>> Kind of a silly concern, but nevertheless: >>> >>> IntelliJ IDEA does a great job at optimizing imports for you. While >>>doing >>> so, it also insists in reorganizing them following some logic. >>> Since it's not nice to have a patch dirtied by imports reordering every >>> time a different person touches a class, it could be a good idea to >>>come up >>> with a convention and configure our IDEs accordingly. >>> >>> Example (blank lines matter): >>> >>> org.apache.giraph.* >>> >>> org.* >>> >>> com.* >>> >>> javax.* >>> java.* >>> >>> Or any variation you prefer. >>> >>> If there is agreement we can update the code conventions. >>> >>> Alessandro >>> >>
