TAGS :Viewed: 8 - Published at: a few seconds ago

[ What exactly does Cleanup in Commit Changes dialogue of IntelliJ means ]

There are several check boxes when user tries to commit or push changes, using IntelliJ, in the dialogue box shown below.

I pretty much understand all other options, but not sure what exactly Cleanup does?

enter image description here

I tried reading documentation and found this link, https://www.jetbrains.com/idea/help/commit-changes-dialog.html and its written

Cleanup - Select this check box if you want to automatically apply the current inspection profile to the files you are going to commit.

But still not sure what it means and what exactly it checks or fixes automatically in source code.

Answer 1


There are a bunch of inspections that are marked as Cleanup. They mostly consist of code style inspections and all have a quickfix to fix the problem they detect. In the inspection settings (File | Settings | Editor | Inspections) you can filter the list to Show Only Cleanup Inspections, to see which ones they are.

When you select the Cleanup checkbox in the commit dialog, all cleanup inspections you have enabled in the current inspection profile will check the files you are committing and apply the quickfixes if any problem is found before committing to the version control server.