Uploaded image for project: 'SonarQube'
  1. SonarQube
  2. SONAR-10363

Default should be reset from built-in profiles with 0 rules

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 7.0
    • Fix Version/s: 7.2
    • Component/s: Quality Profile
    • Labels:
      None

      Description

      Set up

      Install a community plugin (analyzerX) that defines language X and provides 1 built-in profile, "X profile". This profile becomes the default.

      Shut SonarQube down, remove analyzerX and replace it with SonarX, which (also) defines language X and provides 1 built-in profile, "Sonar way". Restart SonarQube.

      What happens

      X profile is retained, and remains the default, although it now has 0 rules.
      Sonar way is also available.

      What we'll change

      Ensure that if the default quality profile for an organization is a built-in quality profile without any rules (so we should be in the case of removing a previous plugin), is a built-in quality profile containing at least one rule for a specific language.

      Why we're not automatically deleting those empty profiles

      There is no direct link between a built-in quality profile and a plugin. And some quality profiles can be inherited from the built-in, so deleting a built-in quality profile would require either to :

      1. Removing the inheritance,
      2. Move the inheritance to a new quality profile.

      Both solutions may break the configuration and are done during startup, making those actions "magical" and users may not understand what happened. If the deletion of the plugin was a mistake, recovering from this mistake will be hard for the user (first he needs to understand what happened and must recreate the quality profiles).

        Attachments

          Activity

            People

            • Assignee:
              eric.hartmann Eric Hartmann
              Reporter:
              ann.campbell.2 Ann Campbell
            • Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Due:
                Created:
                Updated:
                Resolved: