Rule highlighting in the editor doesn't match the severity

Please provide

  • Operating system: Windows 11
  • Visual Studio version: VS 2026 Professional version 18.10.3
  • SonarQube for Visual Studio plugin version: 10.9.0.17293
  • Programming language you’re coding in: C#
  • Is connected mode used: The issue happens both when connected to SonarQube Cloud and when not connected.

And a thorough description of the problem / question:

If the code has some SonarQube rule violations, then the error list in Visual Studio shows them either as “messsage” or “warning” severity. But the highlighting in the code editor is always shown as a warning (green underline).

Example code:

public bool Demo()
{
    // TODO: Enable this code
    //int i = 1;

    // The first line should look more like the 'if' here:
    if (FirstName == null)
    {
        return true;
    }
    else
    {
        return false;
    }
}

The error list shows different severities:

But the editor shows both SonarQube rule violations as a warning: