【问题标题】:Sonarqube synchronization errorSonarqube 同步错误
【发布时间】:2016-04-18 04:41:16
【问题描述】:

我在 Java 中为 sonarqube 创建了一个自定义规则。 规则已创建,我可以在 sonarqube UI 中看到。

现在的问题是当我尝试从 Eclipse 中检查该规则时。我收到错误: :同步问题,遇到了一些问题”。

当我从 eclipse 检查日志时,我有这个:

!ENTRY org.sonar.ide.eclipse.core 4 4 2016-04-18 10:02:36.641
!MESSAGE 
!STACK 0
java.lang.NullPointerException
    at org.sonar.ide.eclipse.wsclient.internal.SonarWSClientFacade.getUnresolvedRemoteIssuesRecursively(SonarWSClientFacade.java:170)
    at org.sonar.ide.eclipse.core.internal.remote.RemoteSourceCode.getRemoteIssuesRecursively(RemoteSourceCode.java:107)
    at org.sonar.ide.eclipse.core.internal.jobs.SynchronizeAllIssuesJob.doRefreshIssues(SynchronizeAllIssuesJob.java:131)
    at org.sonar.ide.eclipse.core.internal.jobs.SynchronizeAllIssuesJob.fetchRemoteIssues(SynchronizeAllIssuesJob.java:120)
    at org.sonar.ide.eclipse.core.internal.jobs.SynchronizeAllIssuesJob.run(SynchronizeAllIssuesJob.java:76)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

如果有任何帮助,我将不胜感激。另外我想知道是否有办法抑制我对某些 java 文件的自定义规则。我见过//nosonar@supress() 之类的选项。请让我知道如何禁止某些 java 文件的自定义规则。

【问题讨论】:

  • Eclipse 的哪个版本? Eclipse 的 SonarQube 插件?和 SonarQube 的?
  • Sonarqube 服务器版本:5.4,sonarlint 版本:2.0,Eclipse(release 2(4.4.2))
  • 现在它在从 sonarqube eclipse 插件切换到 sonarlint 2.0 插件后工作。我想问一下,我创建了一个 java 规则和我能够在 sonarqube UI 中看到的规则结果,但是在分析后我无法在我的 Eclipse 中看到。 javaFileScannerContext.addIssue(importTree, this, "避免导入(第三方导入)");
  • sonarlint 是否适用于自定义规则:jira.sonarsource.com/browse/MMF-248

标签: sonarqube sonarlint-eclipse


【解决方案1】:

看来这是版本问题。 sonarqube eclipse 插件不适用于 sonarqube 5.4 服务器。 如果您使用的是 sonarqube 5.2+ 服务器。您必须使用 sonarlint eclipse 插件进行分析。

【讨论】:

猜你喜欢
  • 2018-01-31
  • 2018-03-29
  • 2021-12-20
  • 1970-01-01
  • 2016-08-03
  • 2015-07-27
  • 2014-12-19
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多