apex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pramod Immaneni <pra...@datatorrent.com>
Subject Re: Import order enforced by checkstyle
Date Tue, 29 Sep 2015 14:46:01 GMT
I would go with * imports after com.* otherwise the other points you
mention are fine.  I agree with the point that it is not possible to bunch
static with their groups in IntelliJ, if it did it would be great. I prefer
them at the bottom.

Thanks

On Tue, Sep 29, 2015 at 6:49 AM, Chandni Singh <chandni@datatorrent.com>
wrote:

> I see a difference between your suggestion and Chetan's import order.
>
> com.datatorrent.* is always the lowest one and I think static imports are
> not at the bottom in Chetan's.  Static imports for each group are present
> below that group. His order is something like:
>
> com.* imports
>
> org.* imports
>
> org.apache.* imports
>
> * imports
>
> com.*
>
> com.datatorrent.* imports
>
> Chetan please confirm.
>
> About static imports I think it should be either top or bottom because it
> is quite difficult to configure the in-flow order with eclipse/intellij.
>
> Chandni
>
>
> On Tue, Sep 29, 2015 at 4:11 AM, Pramod Immaneni <pramod@datatorrent.com>
> wrote:
>
> > I prefer the following order which I borrowed from Chetan a while back
> >
> > all java/javax imports
> >
> > com.* imports
> >
> > org.* imports
> >
> > org.apache.* imports
> >
> > com.datatorrent.* imports
> >
> > * imports
> >
> > all static imports
> >
> > The rationale is as you go down the list you have more
> control/flexibility
> > on names for what you want to include.
> >
> > Thanks
> >
> > On Mon, Sep 28, 2015 at 7:48 PM, Chandni Singh <chandni@datatorrent.com>
> > wrote:
> >
> > > Hi All,
> > >
> > > If you have issues with the current import order, please respond to
> this
> > > thread.
> > >
> > > I don't have any strong opinions on the order of static and 3rd party
> > > library imports because I seldom refer to imports and to me in this
> case
> > > only consistency is of utmost importance.
> > >
> > > If ordering of imports or placement of static imports are very
> important
> > to
> > > you then please respond here.
> > >
> > > Also Checkstyle is mature enough to handle different styles of import
> > > placement so we don't need more plugins to achieve this.
> > >
> > > We need to reach on a consensus soon so that already merged checkstyle
> > rule
> > > can be modified.
> > >
> > > Chandni
> > >
> > >
> > > On Fri, Sep 25, 2015 at 4:58 PM, Chandni Singh <
> chandni@datatorrent.com>
> > > wrote:
> > >
> > > > Hi,
> > > >
> > > > Following is the import order:
> > > >
> > > > The import order is following:
> > > >
> > > > all static imports
> > > >
> > > > all java/javax imports
> > > >
> > > > org.* imports
> > > >
> > > > com.* imports
> > > >
> > > > * imports
> > > >
> > > > com.datatorrent.* imports
> > > >
> > > > Each group is lexicographically sorted and separated by an empty
> line.
> > > > Please configure your IDEs to do so.
> > > >
> > > > I am working on APEX-151 <
> https://malhar.atlassian.net/browse/APEX-151
> > >
> > > meanwhile
> > > > to provide settings for commonly used IDEs.
> > > >
> > > > Thanks,
> > > > Chandni
> > > >
> > > >
> > > >
> > >
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message