Quality Profiles Import from different version of SonarQube

Must-share information (formatted with Markdown):

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
    9.2

  • what are you trying to achieve
    I have a old Quality Profile in SonarQube 6, I want to import it to SonarQube 9.2

  • what have you tried so far to achieve this

  1. From the source SonarQube instance, open the Quality Profile you want to use.
  2. Select Back up from the Settings drop-down drop-down menu. This exports the profile as an XML file.
  3. From the target SonarQube instance, click the Restore button on the Quality Profiles main page.
  4. Choose the XML file that you exported previously, and click Restore .

Result: Only few of the rules were imported.

Hi,

A lot has changed since SonarQube 6.*, including rule keys in the case of Java. You’ll probably have better results by reading the XML file yourself and doing this manually.

 
:woman_shrugging:
Ann

Hi Ann,

Thank you for your time and response.

I read the XML and searched the rule keys/key phrase in SonarQube 9, but it’s not efficient. Most of the time, can not find anything in SonarQube 9. Like you mentioned, both keys and key phrase names have changed a lot.

l am hoping there’s a document that can be used to translate/map SonarQube 6 to SonarQube 9 keys during my manual importing rule process.

Sincerely

Hi,

Sorry, but we don’t have a document like that. That’s why I figured human interpretation from the XML to current rules was your best bet.

 
:woman_shrugging:
Ann

Thank you Ann for your time and suggestions!

Sincerely

1 Like