On this page:
- Customizing profiles
- Creating and copying profiles
- Deleting profiles
- Importing and exporting profiles
- Adding or editing the profile description
An inspection profile defines the types of problems to be sought for, i.e. which code inspections are enabled/disabled and the severity of these inspections. Profiles are configurable in the Inspections settings page.
To set the current inspection profile (the one that is used for the on-the-fly code analysis in the editor), simply select it in the Inspections settings page and apply changes. When you perform code analysis or execute a single inspection, you can specify which profile to use for each run.
PhpStorm allows you to customize the existing inspection profiles (including default profiles), and create new ones. You can also share, import and export inspection profiles.
PhpStorm distinguishes between global and project profiles.
- Global profiles
These profiles are saved in an application config directory (for example,
~/.PhpStormXXXX/config/inspectionon Linux) and are available for any user project.
- Project profiles
These profiles are saved in a particular project's
.ideadirectory (for example,
To customize a profile
- 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.
Creating and copying profiles
To create or copy a profile
- In the inspection settings, choose the profile that you want to copy.
- Click Manage, and then choose Copy.
- In the Profile field, type the name of the new profile. Press Enter to save the entry, or Escape to discard changes.
- Apply changes. The new profile is created as the copy of the selected profile.
To delete a profile
- In the inspection settings, select the profile to be deleted from the list of profiles.
- Click Manage, and then choose Delete.
- Apply changes.
Importing and exporting profiles
To import a profile
To export a profile
Adding or editing the profile description
To add profile description
- In the inspection settings, select the profile that you want to add a description for.
- Click Manage, and then choose Add description. The field for entering description text appears.
- Type the desired description, and press Enter to save the entry, or Escape to discard changes.