Severity changed in sonarqube will not change severity in sonarlint if sonarqube doesn't make first scan after change made

Hello,

I am using sonarqube 6.5.7 and sonarlint 3.6

I change severity of one of the rules is sonarqube. Then in my eclipse (mars) I updated the sonarlint binding and analyzed the file which break the rule. The severity still not change yet. So I analyze from Sonarqube and ensure that it has change in Sonarqube report.

Next, I analyzed with sonarlint again, and the severity changed.

I want to know, is severity only will change in sonarlint if sonarqube has scan first? Can I make it change right after it change?

Hi,

If you’re in connected mode then SonarLint is getting its data about existing issues from SonarQube. And until the next analysis, the severity of that existing issue is still what it was before you changed the rule severity. You see, there’s no continuous relationship between a rule and its issues. A rule is added to a profile and it raises issues. Those issues exist in that beginning state until the next analysis, during which the rule might:

  • no longer be in the profile -> issue closed
  • have a changed severity -> issue updated
  • not detect the issue any more -> issue closed

But until that analysis the issues raised at the last analysis remain as they were unless you manually intervene (mark False Positive, or Won’t Fix) directly on those issues.

 
HTH,
Ann

1 Like

Okay, thank you. :sunny: