calcite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Atri Sharma <atri.j...@gmail.com>
Subject Re: Checkstyle Stuff
Date Tue, 25 Oct 2016 16:16:11 GMT
Super,thanks

On Tue, Oct 25, 2016 at 9:19 PM, Julian Hyde <jhyde@apache.org> wrote:
> I’ve never had the energy to maintain a pre-defined intellij format. But frankly I
find it easy enough to set up intellij by checking a couple of check-boxes. (IIRC, we use
pretty much the standard formatting, but disallow star imports, and indent “case” differently.)
>
> The key thing is to prevent intellij (or whatever IDE you use) from automatically reformatting
code. Otherwise it will screw up a lot of code very quickly. And in fact one of the main goals
of having a project code style is to prevent spurious diffs.
>
> I’ve found that once I’ve manually re-ordered the imports of a java file, intellij
will do its best to keep that order when it adds future imports. Intellij always seems to
want to put ‘com.google’ imports before ‘org.apache.calcite’, which is wrong, but
once I fix that checkstyle is usually happy.
>
> I run ‘mvn validate' in emacs to quickly find and navigate to the errors:
>
>   $ emacs -nw --eval "(compile \"mvn -o -DskipTests validate | grep '^/'\")"
>
> Julian
>
>
>> On Oct 25, 2016, at 1:25 AM, Atri Sharma <atri.jiit@gmail.com> wrote:
>>
>> Folks,
>>
>> I am stuck in a Checkstyle issue for some new imports in a rule I
>> added. I used IntelliJ's auto ordering but somehow checkstyle still
>> does not seem happy with my order of imports.
>>
>> Is there a specific configuration that I can use for avoiding this, or
>> a manual order that I can use to manually order my imports?
>>
>> --
>> Regards,
>>
>> Atri
>> l'apprenant
>



-- 
Regards,

Atri
l'apprenant

Mime
View raw message