By default, CLion analyzes the code in all open files and highlights the detected code issues. You can fix most of the issues immediately by applying quick-fixes.
Place the caret at the highlighted piece of code and press AltEnter:
You can also hover over the highlighted element and apply a quick-fix from the inspection popup:
For some inspections, you can open a preview by pressing CtrlShift0I.
To display the source code of an issue in the editor, when it is selected in the Problems tool window, toggle the Navigate with Single Click button.
If you find that some of the reported issues are minor or not helpful to you, you can ignore them either by disabling the corresponding inspection or by suppressing it in a specific piece of code.
If CLion suggests any fixes to the issue as described above, you can use one of them to fix the problem immediately:
You can also batch-apply quick fixes for several issues at a time. Click Fix partially in the results description tab:
Alternatively, you can select several issues and choose a proper quick-fix from the context menu.
If no resolutions are suggested, use the Jump to source command in the context menu and fix the problem manually.
Export results
After you run inspections, results are displayed on a dedicated tab of the Problems tool window. You can export them to one of the available formats.
In the Problems tool window (View | Tool Windows | Problems or Alt06), switch to the tab that contains the inspection results that you want to export and click .
Select the format in which you want to save the report: HTML or XML.