Hi there
We use SonarQube on Teamcity. Our solution is quite large (around 2 million LOC). Therefore buildtime is always an issue.
A normal build in our buildchain takes approx. 10-15mins. When we include SonarQube our buildtime is around 40 mins.
I’m currently trying to get our buildtime down as much as possible. My first step was to create a dedicated build configuration for sonarqube which disables all static code analysis. We currently use NSDepCop, StyleCop as well as Roslyn and C# code analyzers.
The config looks like this atm:
<DebugType>full</DebugType>
<RunCodeAnalysis>false</RunCodeAnalysis>
<RunAnalyzersDuringBuild>False</RunAnalyzersDuringBuild>
<RunAnalyzersDuringLiveAnalysis>False</RunAnalyzersDuringLiveAnalysis>
<EnforceCodeStyleInBuild>False</EnforceCodeStyleInBuild>
<DisableNsDepCop>true</DisableNsDepCop>
<DefineConstants>DEBUG;$(DefineConstants)</DefineConstants>
<StyleCopEnabled>false</StyleCopEnabled>
I assumed, this would disable all analyzers. But when I run a build with reportanalyzers=true and verbosity:detailed, I still get reports for all the static code analyzers.
We configure all the analyzer rules in an .editorconfig.
We currently have 2 “build-paths” on teamcity:
- one with all the static code analyzers on. this one also runs all the tests
- one with all the static code analyzers off. this one only runs the sonarqube analyis
Does anybody have an idea how to accomplish this and actually completly disable all other analyzers beside sonarqube?
As a sidenote: I know that there is an option in sonarqube if other analyzers should be reported. That’s not what I mean with this. I want to disable them completely. I only care about what sonarqube has to say about our code.
Any help is highly appreciated