在 Eclipse 中使用 SonarQube

2024-05-10Java开发问题
7

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

问题描述

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

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

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

Here It said: Link projects to Sonar server

什么是服务器?我们是否应该在其他地方创建另一个与 Eclipse 中的项目同名的项目?

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.

推荐答案

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

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

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

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

完成这两个步骤后,一旦您将本地项目与 Sonar 服务器相关联,您就可以直接在 Eclipse 中运行分析.

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.

更新:Sonar 5.2+ 不再支持 sonar eclipse 插件,而是支持 sonarlint.不幸的是,sonarlint 没有自定义选项.

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

我们将在即将发布的版本中提供此功能,可能会通过需要将 SonarLint 与现有的 SonarQube 服务器连接"实例.

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

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

The End

相关推荐

如何使用 JAVA 向 COM PORT 发送数据?
How to send data to COM PORT using JAVA?(如何使用 JAVA 向 COM PORT 发送数据?)...
2024-08-25 Java开发问题
21

在 Eclipse 项目中使用西里尔文 .properties 文件
Use cyrillic .properties file in eclipse project(在 Eclipse 项目中使用西里尔文 .properties 文件)...
2024-08-25 Java开发问题
18

Eclipse 在尝试启动 Android 应用程序时卡住了
Eclipse gets stuck when trying to launch Android app(Eclipse 在尝试启动 Android 应用程序时卡住了)...
2024-08-25 Java开发问题
14

Java 代表?
Java Delegates?(Java 代表?)...
2024-08-25 Java开发问题
15

Eclipse:无法初始化监视器线程:无法建立环回连接
Eclipse: Failed to initialize Monitor Thread: Unable to establish loopback connection(Eclipse:无法初始化监视器线程:无法建立环回连接)...
2024-08-25 Java开发问题
4

Eclipse-找不到JDK
Eclipse- JDK not found(Eclipse-找不到JDK)...
2024-08-25 Java开发问题
6