Versions used:
– SonarQube: 7.9.1 Community Edition
– Plugin: sonar-csharp-plugin-8.6.1.17183.jar
Error observed: After migration to SonarQube 7.9.1, in a C# analysis with Azure DevOps (Steps: SonarQube begin, MSBuild, SonarQube end), msbuild step can take many hours (I have tested it up to more than 10 hours) and does not end.
Steps to reproduce: Analyze a C# project with Azure Devops
Steps
– Prepare Analysis with SonarQube
– Build Solution (parameters --> /p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true /p:PackageLocation="$(build.artifactstagingdirectory)\" /p:reportanalyzer=true /v:d)
– Run Code Analysis
We’ve had many performance improvements since sonar-csharp 8.6.1. The latest significant improvement is in 8.13.1. We encourage you to update the plugin version from the SonarQube Marketplace, and see if it reproduces.
Thank you, and I am sorry that you need to disable all these valuable rules for the build to work. If you have time, I would be interested if you can narrow down the problem to one of these rules (or is it that all these rulesmust be disabled for the build to run)?
We would really be interested to narrow the problem more, so we can investigate and fix the underlying issue. Does the project that didn’t end the build before:
have huge files (tens of thousands of LOC)?
have huge methods (thousands of LOC)?
have any particular characteristic (we’ve seen problems with entity framework migration files before)?
Thanks a lot. If you want, we can continue this discussion on a private thread to avoid giving much details in the public.