SonarQube Custom rules missing when restoring plugin quality profile xml

I have Sonar XML plugin installed and we have our own XML file with predefined rules. When restoring the profile by referencing the xml file, sonar does not import the custom rules and instead shows the "Rule not found:" error. The only imported rules are the three default rules (indent, newline, etc.). Within the restored profile, I can create custom rules from the xpath_rule template and create another profile backup. Then I can delete / restore the profile referencing the new backup xml file generated by sonar and it will import all rules correctly.

However, if I uninstall the xml plugin or do a fresh install of the sonar and try to restore the profile, it again does not import the custom rules and only displays the three default rules despite the backup file the sonar was created on, the backup process ...

I've tested this on 3.7.4, 4.0, 4.1.2, 4.2, 4.5.4 and 5.1 with the same results across the board. When I was tackling this issue, I only saw posts a year ago without permission.

The idea is to have one xml file that all our developers can restore to import the latest rules. Any help would be greatly appreciated.


source to share

All Articles