IntelliJ IDEA 2016.2 Help

Customizing Profiles

On this page:

Introduction

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.

IntelliJ IDEA allows you to customize the existing inspection profiles (including default profiles), and create new ones. You can also share, import and export inspection profiles.

IntelliJ IDEA distinguishes between global and project profiles.

Global profiles

These profiles are saved in an application config directory (for example, ~/.IntelliJIdeaXXXX/config/inspection on Linux) and are available for any user project.

Project profiles

These profiles are saved in a particular project's .idea directory (for example, $PROJECT_DIR/.idea/inspectionProfiles on Linux).

Customizing profiles

To customize a profile

  1. In the inspection settings, select the profile to be changed.
    select_profile

    Note that the default profiles are also editable.

  2. 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.

  3. 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.

  4. Apply changes.

Creating and copying profiles

To create or copy a profile

  1. In the inspection settings, choose the profile that you want to copy.
  2. Click Manage, and then choose Copy.
  3. In the Profile field, type the name of the new profile. Press Enter to save the entry, or Escape to discard changes.
  4. Apply changes. The new profile is created as the copy of the selected profile.

Deleting profiles

To delete a profile

  1. In the inspection settings, select the profile to be deleted from the list of profiles.
  2. Click Manage, and then choose Delete.
  3. Apply changes.

Importing and exporting profiles

To import a profile

  1. In the inspection settings, click Manage, and then choose Import.
  2. In the Select Path dialog box, locate the desired xml file, and click OK.
  3. Apply changes.

To export a profile

  1. In the inspection settings, select the profile that you want to export.
  2. Click Manage, and then choose Export.
  3. In the Select Path dialog box, locate the desired directory, where the xml file of the current inspection profile will be saved, and click OK.
  4. Apply changes.

Adding or editing the profile description

To add profile description

  1. In the inspection settings, select the profile that you want to add a description for.
  2. Click Manage, and then choose Add description. The field for entering description text appears.
  3. Type the desired description, and press Enter to save the entry, or Escape to discard changes.

When a description of the profile already exists, the command changes to Edit Description.

See Also

Procedures:

Concepts:

Last modified: 23 November 2016