在sonarqube网站上,新的C#插件文档声明为对fxcop的本地支持。
但是,没有解释如何让fxcop运行。它不是从盒子里出来的。
我到目前为止所做的工作:
不起作用的是使用fxcop rules.When,我启用了1条规则,让跑步者给出以下异常:
错误:在声纳跑步者执行过程中出错:无法在org.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLaunc her.java:91执行声纳)在org.sonar.runner.impl.BatchLauncher$1.run(BatchLauncher.java:75) at java.security.AccessController.doPrivileged(Native方法)在org.sonar.runner.impl.BatchLauncher.doExecute(BatchLauncher.java:69) at org.sonar.runner.impl.BatchLauncher.execute(BatchLauncher.java:50) at org.sonar.runner.api.EmbeddedRunner.doExecute(EmbeddedRunner.java:102 在org.sonar.runner.api.Runner.execute(Runner.java:100) at org.sonar.runner.Main.executeTask(Main.java:70) at org.sonar.runner.Main.execute(Main.java:59) at org.sonar.runner.Main.main(Main.java:53)引起的: java.lang.IllegalArgumentException:属性"sonar.cs.fxcop.a“ 必须设置FxCop“,并且必须生成该项目以执行http://docs.codehaus.org/x/TAA1Dg.If ru。此属性可由Visual项目插件的分析引导程序自动设置,请参阅:http://docs.codehaus.org/x/TAA1Dg.If您希望跳过对未生成项目的分析,设置属性"sonar.visu alstudio.skipIfNotBuilt”。
到目前为止我尝试过的是:
由: java.lang.IllegalArgumentException:无法找到由属性"sonar.cs.fxcop.assembly“提供的程序集"C:\p sonar.cs.fxcop.assembly”引起的。
总之,一步一步的指南,如何使fxcop与声纳5.1和msbuild声纳运行在声纳的网站将不胜感激。
发布于 2015-11-24 11:48:38
我认为你应该读http://www.sonarqube.org/easy-analysis-of-visual-studio-solutions-with-the-sonarqube-scanner-for-msbuild/和http://docs.sonarqube.org/display/PLUG/C%23+Plugin。
请注意,您应该从“Visual 2013或更高版本的开发人员命令提示符”(http://docs.sonarqube.org/display/SONAR/Analyzing+with+SonarQube+Scanner+for+MSBuild)运行这些命令。DOS命令提示符和PowerShell都不能工作,因为它们没有设置适当的变量。
FxCop本机支持并不意味着它附带了MSBuild SonarQube Runner,但您必须安装Visual >= 2013 (我认为您从消息中理解了这一点)。
此外,我发现,不仅声纳项目,属性已被废弃,但你必须删除它,以避免奇怪的行为。
https://stackoverflow.com/questions/32633449
复制相似问题