.NET Analysis now has an option to enable concurrent execution that can significantly reduce analysis time. It can be enabled by setting the environment variable SONAR_DOTNET_ENABLE_CONCURRENT_EXECUTION to true. Whilst this has not caused any issues in our testing, we will not enable this by default until we are satisfied that there are no issues “in the wild”. Please let us know if you have tried this setting, we’d love to receive your feedback, good or bad.
This release also includes more support for analysing the new features of C#9. See the release notes for more details.
These changes are available now on SonarCloud and will be included in SonarQube 9.1.
Has this been pushed out to the global tool yet? I’m trying to run it in my GitHub Actions workflow, which as you can see from the logs below, the environment variable is set, but Sonar is still saying it’s disabled:
Yes, as long as you are using Sonarcloud the scanner should have downloaded the latest analyzer. I’m guessing this is the case otherwise I wouldn’t expect to see the ‘Concurrent Execution’ log line at all. I’ve just tried to replicate your problem without success. Could you post as much of your GH Action as possible without revealing anything sensitive so that we can get a better idea of your setup.
Thanks for posting the repo. I can see that you set the environment variable in the end step. For .NET, as we have a Roslyn analyser, the analysis happens during the build, so this is too late. The following fixes the problem.
In SonarCloud and in the next release of SonarQube (9.5) concurrent execution is on by default. We’ve found that this usually results in a small reduction in analysis time. If for any reason you suspect that it is causing problems you can still turn it off using the environment variable described above.