在Eclipse中使用SonarQube [英] Using SonarQube in Eclipse

查看:430
本文介绍了在Eclipse中使用SonarQube的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚在Eclipse中安装了SonarQube,但是我不知道如何使用它:



这里它说:
将项目链接到Sonar服务器



什么是服务器吗?我们应该在Eclipse中创建与项目名称相同的其他项目吗?



真的很困惑,如果有人可以帮助一个小例子,我会感激。 p>

解决方案

为了能够使用Sonar Eclipse,您首先需要安装如下所述的Sonar Server 5.1或更旧版本: http://docs.sonarqube.org/display/SONAR/SonarQube+in+Eclipse



然后,您将必须运行您的项目的第一个分析(在Eclipse之外)以在Sonar服务器中引用它。请参阅 http://docs.sonarqube.org/display/SONAR/Analyzing+Source+代码



在这两个步骤之后,一旦将本地项目与Sonar服务器关联,您就可以直接在Eclipse中运行分析。 / p>

更新:
Sonar 5.2+不再支持声纳eclipse插件,有利于sonarlint。不幸的是,sonarlint有没有自定义选项


我们将在即将发布的版本中提供此功能,可能是
要求将SonarLint与现有的SonarQube服务器
实例连接。



I just installed SonarQube in Eclipse, but I don't know how to use it :

Here It said: Link projects to Sonar server

What is the server? Should we create another project somewhere else with the same name as the project in Eclipse?

It's really confusing, I will appreciate if someone could help by a small example.

解决方案

To be able to use Sonar Eclipse, you first need to install a Sonar server 5.1 or older as described here: http://docs.sonarqube.org/display/SONAR/SonarQube+in+Eclipse

Then, you will have to run a first analysis (out of Eclipse) of your project to have it referenced in the Sonar server. See http://docs.sonarqube.org/display/SONAR/Analyzing+Source+Code

After those 2 steps, then you'll be able to run analyses directly within Eclipse once you have associated your local project with the Sonar server.

UPDATE: Sonar 5.2+ is no longer supporting sonar eclipse plugin in favor of sonarlint. Unfortunately sonarlint has no customization options.

We will make this feature available in upcoming versions, probably by requiring to "connect" SonarLint with an existing SonarQube server instance.

这篇关于在Eclipse中使用SonarQube的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆