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

The @Rule annotation should allow to declaratively link a rule to some other rules

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Plugin API, Rules
    • Labels:
      None

      Description

      For the time being when a rule A is rewritten (rule B) and so depreciated, the following actions should be done :

      • Flag Rule A as deprecated
      • Append a link at the end of the HTML description of Rule A -> Rule A is deprecated by Rule B
      • Append a link at the end of the HTML description of Rule B -> Rule B depreciates Rule A

      This means that:

      • Three source files must be updated
      • There is no way for SonarQube to be aware of this link between Rule A and Rule B and so no way to display a shortcut to the SonarQube administrator to quickly replace in a Quality Profile Rule A by Rule B (see SONAR-4253)

      To solve this issue, the @Rule annotation should be updated to allow such kind of notations on Rule A :

      @Rule(key = "RuleA", priority = Priority.MAJOR, status="DEPRECATED", links=

      {"IsdeprecatedBy:RuleB"}

      )

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              freddy.mallet Freddy Mallet (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: