Customize Inspection Profiles
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, ~/.CLionXXXX/config/inspection on Linux) and are available for any project.
- Stored in Project
These profiles are saved in a particular project's .idea directory (for example, $PROJECT_DIR/.idea/inspectionProfiles on Linux).
In the inspection settings, select the profile to be changed.
Note that the default profiles are also editable.
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.
Note that inspections, whose state is changed relative to the default values, and all their grouping nodes are highlighted with blue.
In the inspection settings, select the profile you want to manage.
Click and from the 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.