Rule priority is deprecated

I think that the new API deprecation policy is clearer, however I have a question :slight_smile:

Currently org.sonar.api.rules.Rule has a deprecated priority attribute (accessible through the non-deprecated getSeverity() getter), its type is org.sonar.api.rules.RulePriority.

Does it mean that the SonarQube 10.x API will drop that priority attribute or maybe the type will change to a String from org.sonar.api.rule.Severity or org.sonar.check.Priority ?

1 Like

Hi,

That’s a fair question. Unfortunately, I don’t have a solid answer, because I’m not finding anything in Jira that’s directly related. However, based on SONAR-12006 I’m going to make an educated guess and say RulePriority will just go away. From the ticket:

…is outdated (still talk[s] about rule priority)…

And… I’m going to flag this for team attention in case someone wants to contradict me.

 
HTH,
Ann

org.sonar.api.rules.RulePriority will go away, the concept is replaced by org.sonar.api.rule.Severity

1 Like

Thank you both for the answers!
It would be nice if there’s some overlap so we can have compatibility with SonarQube 9.x and 10.x at the same time

We’re in the overlap period now.

 
:slight_smile:
Ann

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.