There are several check boxes when a user tries to commit or push changes, using IntelliJ
, in the dialogue box shown below.
I pretty much understand all other options, but I'm not sure exactly what Cleanup
does?
I tried reading documentation and found this link, https://www.jetbrains.com/idea/help/commit-changes-dialog.html.
It says
Cleanup - Select this check box if you want to automatically apply the current inspection profile to the files you are going to commit.
But I'm still not sure what it means and what exactly it checks or fixes automatically in source code.
tip. You can also run code cleanup using the command-line utility. JetBrains Rider allows you to apply formatting and other code style preferences in a bulk mode to instantly eliminate code style violations in one or more files, in a project or in the entire solution.
IntelliJ IDEA lets you review the state of your project at a selected revision. Open the Git tool window Alt+9 and switch to the Log tab. Select a commit and choose Show Repository at Revision from the context menu.
Commit part of a file IntelliJ IDEA lets you commit such changes separately in one of the following ways: select modified code chunks, that you want to include in a commit right in the Commit Changes dialog and leave other changes pending so that you can commit them later.
Edit a commit message Right-click the commit whose message you want to edit in the Log tab of the Git tool window Alt+9 and select Edit Commit Message from the context menu, or press F2 . In the dialog that opens, enter a new commit message and click OK.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With