This an an archived version of the documentation for SonarQube version 4.3 and below.
See https://docs.sonarqube.org/display/SONAR/Documentation for current functionality
The actions described on this page may only be performed by a Quality Profile administrator.
Creating a Profile
To create a quality profile, click on the Create button on the upper right of the Quality Profiles page.
In the dialog that pops up enter the name of the quality profile. It must be unique among profile names. For some languages, such as Java and PHP, you can optionally provide configuration files for the external tools used during analysis in order to pre-populate the new quality profile with some existing rules configurations. For Java you can provide files for Checkstyle, PMD and Findbugs.
Copying a Profile
To copy an existing quality profile, click on the Copy link next to the profile you want to copy.
You are prompted to give the name of the new profile. It must be unique among profile names. The new profile is an exact copy of the original profile, including inheritance (parent) relationships.
Renaming a Profile
Click on the Rename button. You are prompted to give the new name of the profile.
Renaming a profile will result in a Profile Change event being recorded on the next analysis of each project that uses the profile.
Backing up / Restoring a Profile
The profile backup mechanism downloads profile's rules to an XML file on your machine. It does not preserve projects assignments and profile inheritance relationships, but inherited rules are included in the backup.
The backup/restore mechanism is useful for:
- Promoting the coding rules in a quality profile from a staging environment to a production environment.
- Sharing a quality profile with outsourced subcontractors who cannot access your SonarQube platform.
Click on the Backup link to export a quality profile as an XML file. To restore a quality profile, click on the Restore profile link and choose the XML file from which to restore.
Note that the profile you're importing must have a unique name. That is, it must not already exist in the SonarQube instance where you're trying to import it.
Deleting a Profile
Click on the Delete button. Deleting a quality profile will remove the association with projects. If nothing else is done, the default profile is used to perform the next analysis on the (ex-) associated projects.
Note that you will not be able to delete a language's default profile. Nor will you be able to delete a profile that is the parent of another profile.