Wrong severity for bugs in sonarlint globalconfig

Please provide

  • Operating system Windows 10:
  • Visual Studio version 17.12:
  • SonarLint plugin version 8.4.0.10426:
  • Programming language you’re coding in: C#
  • Is connected mode used:
    • Connected to SonarQube (and which version): 10.1

And a thorough description of the problem / question:

Issues categorized as minor bugs are saved with severity “suggestion” in the sonarlint_csharp.globalconfig:

dotnet_diagnostic.S2955.severity = suggestion

This seems wrong to me, bugs should be marked at least as “warning” to be shown properly in Visual Studio

Hi,

The current version of SonarLint for Visual Studio is 8.6.0. Could you upgrade and make sure this is working the same way before I escalate to the developers, please?

 
Thx,
Ann

Hi,
sorry for the delay.
Yes, the issue is still present for the current version 8.6.0.10679

1 Like

Hi @carlossus

The mapping is based on the Rule Severity, rather than the Type. This rule has Minor severity in our default Quality Profile. You can change the resulting VS severity by increasing the Sonar Rule severity to Major or higher

1 Like

Hi @georgii.borovinskikh ,

that’s also what I concluded. Still, I find it troublesome to ignore the issue type in the analyzer severity.
Yes, it isn’t possible to map type + severity uniquely to severity only, but ignoring the type doesn’t feel right.

Hello Christoph,
We appreciate your feedback and we understand how you would need more flexibility to map the rules severities to Visual Studio severities. However this is not in our current roadmap. We’ll keep a record of this and continue to look out for similar requests. We’ll update this thread if anything changes. Thank you.

2 Likes