I find it much cleaner to suppress code analysis warnings using attributes than pragmas. .NET supports that for a good reason – unlike preprocessor pragmas, attributes respect structure of the code.
While SuppressMessageAttribute still works even for issues reported by SonarQube, SonarQube for IDE is no longer able to generate it.
From Missing Sonar rules in "Suppress or Configure Issues" in raised Warnings , I learned that the native menu for suppressing issues is gone and a custom replacement just for pragmas was implemented. Suppression using .editorconfig was useful, too, but I am mainly missing suppression via attribute. Please, bring it back, ideally by bringing back the native menu where Visual Studio itself generates the suppression. There may be reasons to use a custom implementation, see e.g. Support Suppress using attributes on member and namespace levels , so it would be nice to know about them if they lead to removal of the native functionality on purpose.
I suspect SonarQube for IDE will have a very similar issue also in other IDEs, so I am posting it to the general SonarQube for IDE category.
- Operating system: Windows 10 22H2 (OS Build 19045.7548)
- IDE name and flavor/env: Visual Studio 2026 Professional (18.8.1)
- SonarQube for IDE version: 10.3.0.16878