SonarQube Built In Quality Profiles


  • Version:
  • Error Observed: I am having 2 Built In Quality Profiles within Sonarqube. As part of my plugin, whenever i am creating a second built in quality profile and trying to set it to default, the SonarQube UI is not doing so but the Plugin-API show it as default.
  • Steps To Reproduce:
    Have a Custom Plugin.
    Create a built in quality profile using the plugin, set it to default.

    Stop the SonarQube.
    Change the Quality Profile name which in turn creates a new Built In Quality Profile using the plugin and set it to default.

Kindly help in letting me know how i can get around this issue and set the new Profile as default for all projects.


Hello Anudit,

Your problem is unclear:

  • Do you really want 2 built-in profiles ?
  • It could be that the first declared profile is automatically the default, so in that case, why don’t yu declare the profile that you want to be the default as first profile ?
  • I don’t understand why you stop / start SonarQube

Please clarify all this.


Hi Olivier,

Thank you for your response. I have a use case where different domains can use the custom plugin that i have built. Now each of these domains has their own coding standards and hence would require specific rules built in to check against each. In order to avoid giving the Developers too much right on the Quality Profile and the rules themselves, i want to build a built-in profile for that.

Your point 2 is perfect correct and would fit in very clearly in an Ideal world where the Dev Ops would create the SonarQube and would put the correct name (What they want) and run the SonarQube in the first instance itself. In case the above fails and they decide to do so again, that is where this issue and condition can occur. Its a very rare chance but considering we are involving users here, it is still a possibility.

Kindly provide your thoughts or inputs on this.