CLion lets you configure settings for your code validation analysis and save them as inspection profiles. You can customize the existing inspection profiles (including default profiles), and create new ones. You can also share, import and export inspection profiles.
CLion distinguishes between IDE and project profiles.
- Stored in IDE
These profiles are saved in an application config directory (for example,
~/.XX/config/inspectionon Linux) and are available for any project.
- Stored in Project
These profiles are saved in a particular project's
.ideadirectory (for example,
- In the inspection settings, select the profile to be changed.
Note that the default profiles are also editable.
- Customize the desired inspections: enable or disable, change their severity and the other options, which can be different for the various inspections.
Note that the selectors of severity and scopes, and the options section (if any) are only available for the enabled inspections.
- To apply an inspection to a restricted set of files, associate it with the corresponding scopes.
By default, all inspections apply to all the sources of the current project.
- Apply changes.
- In the inspection settings, select the profile you want to manage.
- Click and from the drop-down list, select one of the following options:
- Copy to IDE or Copy to Project - to copy the selected profile to either IDE level or the project level.
- Duplicate - to make a copy of the selected profile. You can change the name of the profile in the Profile field.
- Rename - to rename the selected profile.
- Delete -to delete the selected profile.
- Restore Defaults - to change the selected profile back to its default settings.
- Add Description or Edit Description - to add a new or edit an existing description for the selected profile.
- Export - to export the selected profile in a form of XML file. You can select where to export your profile.
- Import Profile - to import the desired profile (XML file). You can select where to import your profile.
- Apply changes.