Introduction
When you run an inspection against your code, the Inspection Results Tool Window is displayed showing the results of code analysis. You can then examine the issues that have been detected and apply the suggested quickfixes.
However, you may want to streamline this process by automatically applying the quickfixes from your inspection profile to the selected scope, without having to examine the results and implement each separate fix individually.
Applying quickfixes automatically
- From the main menu, select Analyze | Code Cleanup .
- In the Specify Code Cleanup Scope dialog that opens, select ths scope to which you want the inspection profile to be applied.
-
Select the inspection profile from the drop-down list, or click the
button to configure a new profile in the
Inspections dialog that opens. You can also click the
button to check which fixes will be applied.
- Click OK to launch the inspection.
Applying quickfixes on commit to VCS
- From the main menu, select VCS | Commit Changes.
- In the Commit Changes dialog that opens, select the files that you want to commit, and select the Cleanup code option in the Before Submit area.