I have a dotnet core build within an Azure DevOps pipeline that usually takes 3 minutes. This build is for a collection of production code and unit test projects
If I enable SonarQube analysis, using the SonarWay profile, this build time jumps up to around 3 hours.
If I disable the code smells, reducing the rules from approx 250 to 110, the build time drops to just under 2 hours.
I have tried splitting my production code build from unit tests, as it seems to be the unit tests that are the slow part. Doing this means my build time doubles when I enable SonarQube (which is much better) but I obviously loose code coverage which is a major limitation.
Is there anything I can do to bring this build time down to something more reasonable, I expect enabling SonarQube to increase the build time but 3 minutes to 3 hours is unexpected.