简体   繁体   English

自动分析Sonar Qube如何设置?

[英]Automatic analysis Sonar Qube how to setup?

I've set up a SonarQube server, also I use the default sonar-scanner 2.5 version to scan my C# and JS files. 我已经安装了SonarQube服务器,也使用默认的声纳扫描仪2.5版本扫描我的C#和JS文件。 I've successfully created the projects and can view them in sonar qube admin panel. 我已经成功创建了项目,并且可以在声纳qube管理面板中查看它们。

Now my question is I've seen in the documentation the following: 现在我的问题是我在文档中看到以下内容:

http://docs.sonarqube.org/download/attachments/6951178/SQ52Integration.png?version=1&modificationDate=1445455530000&api=v2 http://docs.sonarqube.org/download/attachments/6951178/SQ52Integration.png?version=1&modificationDate=1445455530000&api=v2

It says "Automatic Build + Code Analysis" Im using SVN and I have no idea how to automatically run Sonar Qube when I commit code changes? 它说我使用SVN进行“自动构建+代码分析”,并且我不知道在提交代码更改时如何自动运行Sonar Qube? I use VS 2012 and it has an old plugin for sonar which is kinda confusing and I want to avoid using it. 我使用VS 2012,它有一个用于声纳的旧插件,这有点令人困惑,我想避免使用它。

Can someone please elaborate or point me to the place in the documentation on how to set up automatic code analysis for C# and JS mostly? 有人可以详细说明或指向文档中有关如何为C#和JS设置自动代码分析的地方吗?

Do you have a Continuous Integration server? 您是否有一个持续集成服务器? This would typically be the place that runs the SonarQube analysis. 通常是运行SonarQube分析的地方。

For C# projects, the analysis is done with the "SonarQube Scanner for MSBuild": http://docs.sonarqube.org/display/SONAR/Analyzing+with+SonarQube+Scanner+for+MSBuild 对于C#项目,使用“用于MSBuild的SonarQube扫描仪”进行分析: http ://docs.sonarqube.org/display/SONAR/Analyzing+with+SonarQube+Scanner+for+MSBuild

If you don't have a CI server you could also start the analysis from a Subversion hook script, but that would be a rather unusual setup (and would only work if time between two commits is longer than it takes for the analysis to run) 如果您没有配置项服务器,则还可以从Subversion挂钩脚本开始分析,但这将是一个非常不寻常的设置(并且仅在两次提交之间的时间长于运行分析所花费的时间才能工作)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM