- Operating system: Windows 10
- IDE name : Visual Studio 2022 (17.0.2)
-
SonarLint pluginSonar C# analyzer version: 8.38.0.467 - Connected to SonarQube Version 8.9.5 (build 50698) Developer Edition
Hi everyone,
I have a scenario which I cannot wrap my head around.
We ware using Visual Studio 2022 with SonarLint Sonar C# analyzer v8.38.0.467
Usually when building our projects within our Azure Pipeline and publishing the quality gate information to the server, it works fine.
But now we have a Visual Studio project with SonarLint and the issue seems to be the following:
There are some Sonar Warnings which are shown in the IDE, but when I run “dotnet build -p:Configuration=Release”, the “Sonar Warnings” (starting with S) don’t seem to be shown
in the build output, only the other warnings. I would expect, that all issues are shown in the output.
Sonar Exclusion path cannot be the problem (We are using exclusions within the pipeline, but triple checked that the path of the files are not excluded).
Therefore when publishing the quality gate information, of course, there are no issues reported (since the output does not contain the issues seen in Visual Studio).
In this image you see some of the warnings (these are some S1172 and some CS1998 warnings). All together there are 7 CS1998 and 18 S1172…
…, but in the output only the 7 CS1998 are shown.
(Sorry for the german language in the screenshots )
But of course the S*- Warnings should also be in the output to be correctly reported to the SonarQube project.
How can I approach this problem ?
Is there something wrong with the .ruleset file since it contains the Issues from the Sonar Server project linked in the Visual Studio project ?
Or are we building the project incorrectly ? Or anything else ?
If you need any more information to help me, please let me know, I am not sure, what informations you should be provided in this case…
Thanks in advance
Cheers
Claudius