FxCop analysis using Jenkins SonarQube plugin? -
i'm trying fxcop analysis .net projects within jenkins build (invoke standalone sonarqube analysis).
configuration looks this:
- sonarqube 5.1.2
- c# 4.2
- sonar-runner 2.4
- jenkins: sonarqube plugin 2.2.1
and main problem when enable fxcop rules in sonarqube error:
java.lang.illegalargumentexception: property "sonar.cs.fxcop.assembly" must set , project must have been built execute fxcop rules. property can automatically set analysis bootstrapper visual studio projects plugin, see: http://docs.codehaus.org/x/taa1dg.if wish skip analysis of not built projects, set property "sonar.visualstudio.skipifnotbuilt".
however, if explicitly set sonar.cs.fxcop.assembly in sonar-project.properties point @ assembly (.dll) analysis one, project has multiple assemblies i'd fxcop analysis. if it's possible set list of assemblies argument (is it?) not elegant/generic solution , patterns not accepted value.
i understand msbuild sonarqube runner solve problem (no need set sonar.cs.fxcop.assembly), looks it's not candidate jenkins plugin (under sonarqube runner installations), sonar-runner installations allowed.
is there way fxcop working using jenkins plugin , sonar-runner without setting sonar.cs.fxcop.assembly property?
indeed, msbuild projects should analyzed using msbuild sonarqube runner, there no dedicated build step in jenkins yet: can use execute windows batch command
step execute msbuild.sonarqube.runner.exe begin ...
, msbuild.sonarqube.runner.exe end
in between call msbuild.
with upcoming release of jenkins sonarqube plugin version 2.3, there 2 dedicated build steps, 1 msbuild sonarqube runner's begin call, , 1 end call. see https://jira.sonarsource.com/browse/sonarjnkns-219
you should not use sonar-runner, nor invoke standalone sonarqube analysis
jenkins build step (which calls sonar-runner) analyze .net projects: msbuild sonarqube runner way go.
Comments
Post a Comment