JetBrains / gradle-idea-ext-plugin

Plugin to store IJ settings in gradle script
Apache License 2.0
232 stars 39 forks source link

Feature: run reformat according to .editorconfig or configure diffplug/spotless #91

Open bric3 opened 4 years ago

bric3 commented 4 years ago

One thing that is especially time consuming in a project is tracking and fixing style issues. checkstyle help a bit, but it cannot express the IntelliJ IDEA codestyle, and it is limited to checking.

Spotless plugin on the other hand is much more powerful as it can fix your style automatically according to some rules. However IntelliJ IDEA code style engine cannot be run as it is part of IntelliJ IDEA distribution.

I think that 2019.3 will improve the command line interface of the code style formatter, but still it cannot be run on the CI as IJ does not provides it as a standalone tool.

The idea would be to have IJ codestyle format available as part of spotless of course, see https://github.com/diffplug/spotless/issues/200, IDEA-180965 or IDEABKL-7685.

But as a poor man's intermediate solution, this plugin could

  1. create a task to run IJ code formetter when available e.g. locally
  2. hopefully be able to configure spotless using the .editorconfig ?

It's probably a santa wishlist but I think it may really help.


40