I’m sorry that we do not have the technology to auto-correct. People also 
complain that there are coding standards that are not captured in check style 
rules, so we are caught between a rock and a hard place.

I agree, something like https://github.com/editorconfig/editorconfig/issues/231 
<https://github.com/editorconfig/editorconfig/issues/231>, so that the editor 
is configured based on the project definition (pom.xml) would be nice.

Never underestimate the power of “git diff”. Check to see whether your editor 
has made changes that are not helpful, and back them out before submitting the 
PR. Then change your editor’s config so that next time it either the right 
thing or does nothing.

Julian



> On Sep 16, 2019, at 12:26 PM, Vladimir Sitnikov <sitnikov.vladi...@gmail.com> 
> wrote:
> 
> Rui>when developing in Calcite repo?
> 
> Hi, could you please clarify which issues do you run into the most?
> 
> Rui>auto-formatter to fix checkstyle error
> 
> That would really be awesome.
> Unfortunately, my experience with Checkstyle project 5 years ago was that
> core developers did not value "automatic fix of the issues".
> 
> See example: https://github.com/checkstyle/checkstyle/pull/164
> I used to run into "import order is wrong" a lot, and Checkstyle is not
> very helpful with explaining on what should be done.
> 
> However, then I configured import order, and now it generates the proper
> import order by default.
> It would be great if editorconfig implements
> https://github.com/editorconfig/editorconfig/issues/231 so IDEs could take
> configuration from there.
> 
> 
> Recently I've discovered https://github.com/diffplug/spotless , and I like
> how it prints sensible messages, and it allows to apply lots of fixes
> automatically.
> See example:
> https://travis-ci.org/vlsi/vlsi-release-plugins/jobs/584025923#L410
> We might want to migrate certain checks to spotless so the violations
> become fixable automatically.
> 
> Vladimir

Reply via email to