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

Rename rule key at startup

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 7.1
    • Labels:
      None

      Description

      Consider rule bar:B defined by a plugin.

      At startup, if rule bar:B defines a deprecated key foo:A and foo:A is a rule in database with id 1234, SonarQube should:

      1. rename the rule repository foo to bar and rule key A to B in table RULES for id 1234
      2. update the RULES.RULE index for id 1234 in the same fashion
      3. (there is no need to update the RULES.RULE_EXTENSION index for id 1234 as the rule key can be replaced by the rule id, see SONAR-10313)
      4. (there is no need to rename the key in RULES.ACTIVE_RULE index for id 1234 as the rule key can be removed, it's not used, see SONAR-10313)
      5. (there is no need to update index ISSUES.ISSUE as rule is only referenced to by its id, see SONAR-10303)

      Note: this should integrate with the existing process at startup which updates the rule properties if and when they are updated by the plugin

        Attachments

          Activity

            People

            Assignee:
            sebastien.lesaint Sebastien Lesaint
            Reporter:
            sebastien.lesaint Sebastien Lesaint
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Due:
              Created:
              Updated:
              Resolved: