Hi Till,

If I recall correctly, there is a possibility to import checkstyle
XML's into Eclipse so that the auto format feature would result in
style compliant code. This imported Eclipse config could then be
exported and reimported into IntelliJ but you can imagine that is not
a reason for me to install Eclipse.

That being said, I understand your concerns with auto-format but it
also has its benefits. I've used auto format succesfully to ensure
maximum line length, removal of star imports, ... The only thing I had
an issue with was leading spaces when wrapping lines. I just removed
manually about 100 leading spaces but if I auto format again (it's a
hard habbit to get rid off) I will have to do the same thing all over
again. After a while it just becomes silly and a real waste of
development time.

If we were to provide a common Eclipse and IntelliJ style config, we
could resolve all the style issues with just one shortcut. Git should
take care of the rest really. If you auto format a file that has
already been formatted, it will show up changed in IntelliJ but Git
will recognize that it is in fact unmodified. That way, we would no
longer "touch" files we've not actually modified.

Regards,

Pieter-Jan Van Aeken 

Op Dinsdag, 09/06/2015 om 11:10 schreef Till Rohrmann:

Hi Pieter-Jan,

I'm not aware of an Eclipse or IntellJ auto format profile. I think
that
all Flink contributors apply their style changes manually. The maven
output
should tell you quite precisely what's wrong and in which file the
checkstyle errors occur. Moreover, applying an IDE auto format is in
general discouraged because due to the absence of a common style
profile,
this would change also code which you haven't actually touched. As a
consequence it's no longer possible to see who worked on what part of
the
code.

Cheers,
Till

On Tue, Jun 9, 2015 at 10:50 AM Pieter-Jan Van Aeken <
pieterjan.vanae...@euranova.eu> wrote:

> Hi Flink Community,
>
> I would like to contribute to the code base of Flink but I find
myself
> unable to built my changed project due to errors in my "code style".
>
> My IDE of choice is IntelliJ and unfortunately, I can not import
> "tools/maven/checkstyle.xml" nor
"tools/maven/scalastyle-config.xml".
> From what I understand, this is only possible in Eclipse? Can anyone
> perhaps provide me with the Eclipse Profile XML files so that I can
> use the auto-format function in IntelliJ to make my code comply with
> the style standards? My additions are written in Scala and Java.
>
> Regards,
>
> Pieter-Jan Van Aeken
>
>
>


Reply via email to