I haven't heard any objections to this suggestion. I'm going to move forward 
with it later this afternoon if nobody objects before then.

Thanks,

Nick

On May 13, 2013, at 11:06 AM, Nick Williams wrote:

> I've noticed a lot of inconsistence in import ordering, and importantly I've 
> also noticed that when developers are using IDE (I believe we all are) the 
> IDEs are constantly re-ordering imports previously committed by other 
> developers. This results in lots of commits that appear to change imports but 
> only change import ordering.
> 
> I'd like to add the following CheckStyle:
> 
>        <module name="ImportOrder">
>            <!-- Imports must be separated (by one newline) into the following 
> groups:
>                     java and javax
>                     org
>                     com
>                     all others
>                 Imports within a group must be sorted alphabetically 
> (lexicographically)
>                 All static imports come below all other imports -->
>            <property name="groups" value="/^javax?\./,org,com"/>
>            <property name="ordered" value="true"/>
>            <property name="caseSensitive" value="true" />
>            <property name="separated" value="true"/>
>            <property name="option" value="bottom"/>
>        </module>
> 
> This is similar to import order seen in other Apache projects.
> 
> IntelliJ, Eclipse, and NetBeans are all capable of being configured to order 
> imports in this same manner. If we agree to add this CheckStyle, we should 
> all configure our local IDE per-project settings to enforce this ordering.
> 
> Thoughts?


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to