<br><br><div class="gmail_quote">On Tue, Oct 9, 2012 at 9:53 PM, David M. Lloyd <span dir="ltr"><<a href="mailto:david.lloyd@redhat.com" target="_blank">david.lloyd@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On 10/09/2012 11:55 AM, Jeff Mesnil wrote:<br>
> Hi,<br>
><br>
> Is there an agreement on the order of import statements in our codebase?<br>
><br>
> I'm using eclipse which, by default, organize imports in the following order:<br>
><br>
> static<br>
><br>
> java<br>
> javax<br>
> org<br>
> com<br>
><br>
> but we have some files with a different order *cough*intellij*cough* :)<br>
> That makes for some noise in the commits when I modify a class and eclipse changes the imports order.<br>
><br>
> If we agree with this default order, I can add a checkstyle rule[1] for this.<br>
<br>
</div>We tried this before but it didn't work out because checkstyle gets<br>
confused about imports which are only used in Javadoc, and because<br>
regardless of checkstyle rules everyone cannot agree on an order, and<br>
anyway changes to existing code should NEVER EVER EVER EVER include<br>
import "cleanups", "reorgs", or anything of the sort (no matter how bad<br>
you think it is) along with "real" changes because it just obscures what<br>
has changed and causes trouble. The same goes for whitespace fixes. If<br>
a file is very offensively formatted, I could see considering a<br>
specific, dedicated commit whose sole purpose and content is to clean up<br>
the whitespace (i.e. absolutely no functional changes), but other than<br>
that... no.<br>
<br></blockquote><div>Jeff, i generally agree with you and can share my idea code-style settings with you, but David has a point :|<br>I just enabled "only text changed to vcs" when reformatting code, so you it will be reformatting just changed code and noting else.<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
For new code I can't imagine it really matters as long as you don't use<br>
star imports (though using star with static import for certain classes<br>
is just fine).<br></blockquote><div>checkstyle checks for this during build, so no worries about abusing this. <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<span class="HOEnZb"><font color="#888888">--<br>
- DML<br>
</font></span><div class="HOEnZb"><div class="h5">_______________________________________________<br>
jboss-as7-dev mailing list<br>
<a href="mailto:jboss-as7-dev@lists.jboss.org">jboss-as7-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/jboss-as7-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/jboss-as7-dev</a><br>
</div></div></blockquote></div><br>--<br>Tomaz<br>