dubreuia / intellij-plugin-save-actions

Supports configurable, Eclipse like, save actions, including "organize imports", "reformat code" and "rearrange code".
MIT License
531 stars 101 forks source link

A script to know whether any file would get reformatted on save #340

Closed Arthur-Milchior closed 3 years ago

Arthur-Milchior commented 3 years ago

Describe the solution you'd like Is there a way to uses your product to check whether any file would get reformated on save ? My goal is to have a script which rejects commits/pull request if it is not properly formatted and tell contributors to install your plugin before making a pull request, to ensure the code remain consistently formatted.

One solution could be to simply allow to run the reformater on the whole project with a single project. Then I'll only have to ask git whether any file has changed, and if it is the case reject.

For what product

Shell, travis

dubreuia commented 3 years ago

Hello @Arthur-Milchior, thank you for your interest in the plugin. This is outside of the scope of the plugin, which isn't about formatting, but about executing stuff on save. In you case, you want to: