简体   繁体   English

Sonarlint没有显示SonarQube Java鱿鱼问题(记录)

[英]Sonarlint not showing SonarQube java squid issues (records)

Regarding issues reported by SonarLint On-The-Fly for one java file, I see a small subset of issues for the java file. 关于SonarLint On-The-Fly针对一个Java文件报告的问题,我看到一小部分Java文件问题。 As compared to the SQUID issues shown on SonarQube server for the same file. 与SonarQube服务器上显示的相同文件的SQUID问题相比。

I am using SonarQube server version 6.3, SonarLint 3.1.0.and Eclipse Neon.3. 我正在使用SonarQube服务器版本6.3,SonarLint 3.1.0和Eclipse Neon.3。 Sonarlint is connected to the server successfully and the eclipse project is linked to the project on SonarQube server. Sonarlint已成功连接到服务器,并且eclipse项目已链接到SonarQube服务器上的项目。 The project has component projects and this particular file is in an eclipse component project. 该项目具有组件项目,并且此特定文件在eclipse组件项目中。

This squid:S1258 does not show in Sonarlint although present in the file; 尽管此乌贼:S1258存在于文件中,但未在Sonarlint中显示; however this squid:S2293 shows on both Sonarlint and SonarQube. 但是此squid:S2293在Sonarlint和SonarQube上均显示。

Please advise 请指教

The Sonarlint plugin apparently does not utilize the project references to other projects in eclipse. Sonarlint插件显然没有在Eclipse中利用对其他项目的项目引用。 Our applications are represented in multiple eclipse projects. 我们的应用程序在多个Eclipse项目中都有代表。 The solution that seems to work is simply to associate each eclipse project to the same SonarQube server project. 似乎可行的解决方案只是将每个Eclipse项目与同一SonarQube服务器项目相关联。

I had the same problem, in my case these are the versions in use: 我遇到了同样的问题,就我而言,这些是正在使用的版本:

  • Eclipse Mars.2 (4.5.2) Eclipse Mars.2(4.5.2)
  • SonarLint for Eclipse 3.2.0.xxxx SonarLint for Eclipse 3.2.0.xxxx
  • SonarQube Server 6.1 SonarQube服务器6.1
  • Linux RedHat 64 bit OS Linux RedHat 64位操作系统

Make sure your Eclipse project is bound to the remote SonaQube server project: sometimes the binding is lost or simply the auto bind feature fails with no warning. 确保您的Eclipse项目已绑定到远程SonaQube服务器项目:有时绑定会丢失,或者自动绑定功能会失败而不会发出警告。

Right click your Eclipse project -> SonarLint -> Bind to a SonarQube project

On the window that pops up verify the SonarQube server is selected, click on 在弹出的窗口中,确认选择了SonarQube服务器,然后单击

Auto bind selected projects

check that remote bound project is correct and then click Finish . 检查远程绑定项目是否正确,然后单击“ Finish

You can repeat the procedure to verify the binding is still there. 您可以重复该过程以确认绑定仍然存在。 You can apply the procedure to multiple projects at once, just select them before right-clicking. 您可以一次将该过程应用于多个项目,只需在右键单击之前选择它们即可。

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

相关问题 在eclipse中显示的Sonarlint问题与Sonarqube项目不同步 - Sonarlint issues shown in eclipse not synchronous to Sonarqube project 解决SonarQube中的问题不会影响SonarLint报告的警告 - Resolving issues in SonarQube does not affect warnings reported by SonarLint SonarQube Java问题 - SonarQube Java issues SonarQube(SonarLint / Sonar-JAVA)不应使用冗余演员表 - SonarQube (SonarLint /Sonar-JAVA) Redundant casts should not be used Sonarqube SonarLint定制 - Sonarqube SonarLint Customisation Sonarqube的SonarLint 4.4.1 - SonarLint for Sonarqube 4.4.1 SonarLint|SonarQube - 批量创建@SuppressWarnings - SonarLint|SonarQube - Batch Create @SuppressWarnings SonarQube将技术债务的某些问题显示为“空白” - SonarQube showing some issues with Technical debt as “blank” 它是什么意思以及如何修复SonarQube Java问题“应该删除包之间的循环”(squid:CycleBetweenPackages) - What does it mean and how to fix SonarQube Java issue “Cycles between packages should be removed” (squid:CycleBetweenPackages) Java - SonarQube,关于单例中“实用程序类不应具有公共构造函数”(squid:S1118)的问题 - Java - SonarQube, issue on 'Utility classes should not have public constructors' (squid:S1118) in singleton
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM