简体   繁体   English

在eclipse中显示的Sonarlint问题与Sonarqube项目不同步

[英]Sonarlint issues shown in eclipse not synchronous to Sonarqube project

I'm using Eclipse Java EE IDE (Version: Oxygen Release (4.7.0)) with SonarLint (3.2.0) in connected mode (Sonarqube 6.5.0). 我在连接模式(Sonarqube 6.5.0)中使用Eclipse Java EE IDE(版本:氧气释放(4.7.0))和SonarLint(3.2.0)。

Time by time I have the problem that the issues shown in SonarLint views (SonarLint On-The-Fly and SonarLint Report) are not the same than showing in Sonarqube. 时间问题我发现SonarLint视图(SonarLint On-The-Fly和SonarLint报告)中显示的问题与Sonarqube中显示的问题不同。 Interesting thing is that it is not reproducible using complete empty project only creating this single issue 有趣的是,使用完整的空项目只能创建这个单一问题是不可重现的

The quality profile I'm using only contains the basic rules coming with Sonarqube (no additonal rules from PMD, Checkstyle or FindBugs) 我使用的质量配置文件仅包含Sonarqube附带的基本规则(没有PMD,Checkstyle或FindBugs的附加规则)

  1. Rule not part of used quality profile ("Sonar way rules not included") but still shown in SonarLint (ie "Java 8's 'Files.exists' should not be used (squid:S3725) 规则不是使用质量配置文件的一部分(“声纳方式规则未包括在内”)但仍在SonarLint中显示(即不应使用“Java 8的'Files.exists'(鱿鱼:S3725)

  2. Issue shown in Sonarqube not available in SonarLint (ie "Source files should not have any duplicated blocks") Sonarquint中显示的问题在SonarLint中不可用(即“源文件不应该有任何重复的块”)

  3. Issue shown in SonarLint not active in quality profile (ie "'Preconditions' and logging arguments should not require evaluation (squid:S2629)") SonarLint中显示的问题在质量概况中不活跃(即“'前置条件'和记录参数不应该要求评估(鱿鱼:S2629)”)

Can someone tell me if it is a known issue that there are sometimes deviations between SonarLint and Sonarqube? 有人能告诉我,SonarLint和Sonarqube之间是否存在偏差,这是一个众所周知的问题吗? Because the issue is not reproducible as single problem in sample project, I'm not able to localize the problem. 因为该问题在样本项目中不能作为单个问题重现,所以我无法将问题本地化。

Updated 21.09.2017 09:28 更新于21.09.2017 09:28

As you can see in attached screenshots (as example for the deviations) there are differences even project is bind to Sonarqube server 正如您在附加的屏幕截图中看到的(作为偏差的示例),即使项目绑定到Sonarqube服务器也存在差异

SonarLint中为ZipFile.java类显示的问题

Sonarqube中为ZipFile.java类显示的问题

项目绑定到Sonarqube服务器

It sounds like your project is not in Connected Mode . 听起来您的项目未处于连接模式 That would explain S3725 being raised - it is part of the Sonar way profile, which is used by default on un-connected projects. 这可以解释S3725被提升 - 它是Sonar方式配置文件的一部分,默认情况下用于未连接的项目。 It would also explain why you don't see the same issues in SonarLint that you see in SonarQube. 它还可以解释为什么您在SonarQube中看不到SonarLint中出现的相同问题。

Your missing duplications issue is from one of the Common rules . 您丢失的重复问题来自其中一条通用规则 Those rules are only processed server-side. 这些规则仅在服务器端处理。 You won't see issues from them in pull request analysis, SonarLint, or any other context in which an analysis report is not submitted to the server. 你不会看到在拉动需求分析,SonarLint,或在其分析报告中提交到服务器的任何其他方面从他们的问题。

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

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