Re: Checkstyle in IntelliJ

2015-06-09 Thread Chiwan Park
Hi. IntelliJ IDEA can reformat only changed code. In Reformat File dialog (you can open this by pressing Alt + Cmd + L in OS X), you can choose scope to reformat style. After the scope is changed, you can reformat only changed code without opening the dialog. Following links will be helpful. ht

Re: Checkstyle in IntelliJ

2015-06-09 Thread Matthias J. Sax
On side comment: Eclipse allows to auto format on save and apply the formating rules to changed lines only. Using this feature, it is possible to be style compatible without reformatting unchanged code. Having a format.xml for Eclipse, would help a lot to get a unique code style. The change would

Re: Checkstyle in IntelliJ

2015-06-09 Thread Till Rohrmann
But then we should also provide a code style profile for Eclipse and have to keep them in sync. On Tue, Jun 9, 2015 at 12:33 PM Aljoscha Krettek wrote: > > > > > > > > > > > > > > > > > > This is the contents of Flink.xml in ~/Libra

Re: Checkstyle in IntelliJ

2015-06-09 Thread Aljoscha Krettek
This is the contents of Flink.xml in ~/Library/Preferences/IdeaIC14/ codestyles which is the folder for codestyles on OS X. It is pretty much the standard IntelliJ code style except that I changed it not to align in parameter lists. S

Re: Checkstyle in IntelliJ

2015-06-09 Thread Pieter-Jan Van Aeken
Hi Aljoscha, Yes, I get the style errors in my IDE (although I set the level to warning rather than error). I try to pay close attention to writing my code without checkstyle errors but I simply cannot resist pressing auto format shortkey every now and then. That way all my effort into writing pro

Re: Checkstyle in IntelliJ

2015-06-09 Thread Aljoscha Krettek
By the way, do you have the Flink checkstyle and scalastyle profiles set in IntelliJ? This way you at least get red errors directly in the IDE. For checkstyle there is Checkstyle-IDEA and for scalastyle you can put the scalastyle config of Flink into the .idea directory to have it recognised: cp t

Re: Checkstyle in IntelliJ

2015-06-09 Thread Maximilian Michels
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

Re: Checkstyle in IntelliJ

2015-06-09 Thread Pieter-Jan Van Aeken
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 i

Re: Checkstyle in IntelliJ

2015-06-09 Thread 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 i