flink-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Maximilian Michels <...@apache.org>
Subject Re: Checkstyle in IntelliJ
Date Tue, 09 Jun 2015 09:55:11 GMT
Hi Pieter-Jan,

It would be great to have a plugin for IntelliJ/Eclipse to make new code
stylecheck-compliant. However, as Till mentioned, the problem is that most
such plugins touch more lines than necessary. We try to only commit changes
to the Git repository which are related to the feature/pull request. That
way, commits are more readable and code fragments can be more easily
attributed to the person that originally created it (instead of the one
reformatting it).

Let us know if you find a useful plugin or method to deal with the
mentioned problems.

Best regards,
Max

On Tue, Jun 9, 2015 at 11:30 AM, Pieter-Jan Van Aeken <
pieterjan.vanaeken@euranova.eu> wrote:

> 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.vanaeken@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
> >
> >
> >
>
>
>

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