问题标签 [sonarqube-4.5]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
3560 浏览

java - “没有关于每次测试覆盖率的信息。” 来自 Sonar 和 Jacoco Maven 构建

在尝试执行 Sonar 以导入在具有 jacocoagent.jar 的服务器上生成的 jacoco-it.exec 文件时,我收到以下消息:

[INFO] [09:54:32.420] 传感器 JaCoCoItSensor... [INFO] [09:54:32.462] 分析 /../jenkins/jobs/../jacoco-it.exec [INFO] [09:54: 51.385]没有关于每次测试覆盖率的信息

我已经验证 jacococ-it.exec 文件本身确实有数据(385 MB),所以它肯定是在捕获信息,但声纳无法协调它,我需要帮助修复它。

我正在使用:
一个多模块 maven 项目
Sonarqube 4.5.1
Jenkins Sonar Plugin 2.1
Oracle 11g
jacoco 0.7.4
junit 4.11

Sonar 可以很好地创建和使用 UT 文件 jacoco.exec,但是当它显示 IT 结果时我得到 0%。

[编辑] - 进一步澄清
1. 我们让 jacocoagent.jar 监控应用程序服务器上的 jvm
2. Jenkins 作业针对#1 中的应用程序服务器运行一组硒测试
3. jacoco-it.exec 文件是从应用程序服务器复制到声纳可以读取的位置。为此,我将覆盖 jacoco 插件的声纳路径。
4. 我收到上面的消息说声纳找不到覆盖信息

selenium 测试作为 mvn 的集成测试运行:
mvn org.jacoco:jacoco-maven-plugin:prepare-agent-integration clean package install

0 投票
6 回答
54763 浏览

sonarqube-4.5 - 无法启动声纳服务器

我正在使用 Sonar 生成我的项目的代码审查报告。但我无法启动服务器。我正进入(状态

HeapDumpOnOutOfMemoryError

在跑步的时候

StartSonar.bat

文件。

请查找声纳启动时生成的日志。

C:\TEMP2\Sonar\sonarqube-4.5\bin\windows-x86-32>St​​artSonar.bat 包装器 | --> 包装器作为控制台包装器启动 | 启动 JVM... jvm 1
| 包装器(版本 3.2.3)http://wrapper.tanukisoftware.org jvm 1 | 版权所有 1999-2006 Tanuki Software, Inc. 保留所有权利。虚拟机 1 | 虚拟机 1 | 2015.07.28 07:30:51 INFO app[ospmJavaProcessLauncher] 启动进程[搜索]: C:\Software\jdk1.6.0_18\jre\bin\java -Xmx256m -Xms256m - Xss256k -Djava.net.preferIPv4Stack=true -XX :+UseParNewGC -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -XX:+HeapDumpOnOutOfMemoryError -Djava.awt.headless=true -Djava.io.tmpdir=C:\TEMP2\Sonar\sonarqube-4.5 \temp -cp ./lib/common/ ;./lib/search/组织。sonar.search.SearchServer C:\Users\gxs114\AppData\Local\Temp\sq-process8934190933893070058properties jvm 1 | 2015.07.28 07:30:57 INFO app[ospmMonitor] Process[search] is up jvm 1 | 2015.07.28 07:30:57 INFO app[ospmJavaProcessLauncher] 启动进程[web]: C:\Software\jdk1.6.0_18\jre\bin\java -Xmx768m -XX:MaxPermSi ze=160m -XX:+HeapDumpOnOutOfMemoryError -Djava .net.preferIPv4Stack=true -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djruby.management.enabled=fals e -Djava.io.tmpdir=C:\TEMP2\Sonar\sonarqube-4.5\temp -cp ./lib/common/ ;./lib/server/org.sonar.server.app.WebServer C:\Users\gxs114\AppData\Local\Temp\sq-process4251708419326591677properties jvm 1 | 2015.07.28 07:30:57 信息应用程序 [ospmTerminatorThread] 进程 [搜索] 正在停止 jvm 1 | 2015.07.28 07:30:58 信息应用程序 [ospmTerminatorThread] 进程 [搜索] 已停止包装 | <-- 包装器停止

C:\TEMP2\Sonar\sonarqube-4.5\bin\windows-x86-32>

我该如何解决这个问题?任何想法/解决方案表示赞赏。

0 投票
2 回答
411 浏览

jenkins - Sonar runner 执行 5.0 期间出错。“将 3.7.4 迁移到 5.0 后”

将我的数据库迁移到另一个方案。并从 3.7.4 迁移到 5.0。到目前为止如此完美。

现在在 jenkins 上运行计划任务时,会出现以下错误:

这是一个索引 (SONAR5.SYS_C0078055)。

创建唯一的索引“ Sonar5”。“ sys_c0078055”。 FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT) TABLESPACE "SONAR5_DATA_S" ;

我不明白错误的问题。帮助。谢谢。

0 投票
1 回答
1283 浏览

jenkins - 在 jenkins 中设置 gradle org.sonarqube 插件声纳分析任务(sonarqube)

根据Gradle 论坛上最近的公告, Sonar 插件Sonar Runner 插件被弃用,取而代之的是SonarQube 插件。有人可以分享任何链接(文档或博客)来演示在 Jenkins 中进行设置。我在本地设置和 gradle sonarqube任务上尝试了这个,效果很好。

我们是否应该在自由式 Jenkins 作业中继续使用“调用独立声纳分析”(来自Jenkins-Sonar插件)构建步骤?使用默认设置,它不会从 build.gradle 文件中推断出诸如sonar.projectKeysonar.projectNamesonar.projectVersion之类的强制性信息。sonar.sources为多模块项目手动提供它是痛苦的(特别是对于 sonar.libraries 和 sonar.binaries)。可以考虑生成一个 sonar-project.properties 文件作为自定义 gradle 任务的一部分,该任务随后将由独立声纳分析步骤使用。

但是,这似乎是一个通用要求,我觉得在 Jenkins-Sonar 插件中可能有更简单的方法。熟悉 Jenkins-Sonar 插件的人能否对此有所了解?

系统信息:

提前致谢!

编辑:我不想将远程 sonarqube 实例的数据库用户名和密码放在我的 gradle 构建文件中,因此不想使用现有的“sonarqube”任务。

0 投票
1 回答
179 浏览

sonarqube-4.5 - maven 中央存储库中缺少 sonarqube 4.5.5 LTS 的 sonar-maven-plugin

可以在 maven 中央存储库中找到的最新声纳 maven 插件是 4.5.4(参见http://search.maven.org/#search|gav|1|g%3A%22org.codehaus.sonar%22% 20AND%20a%3A%22sonar-maven-plugin%22 )

0 投票
1 回答
1061 浏览

matlab - Sonarqube中是否有用于解析和集成Matlab的插件?

  1. 有人知道,我在哪里可以找到
    在 Sonarqube 中解析和集成 Matlab 的插件?

  2. 如果我已经获得或编写了这个插件,我可以使用 Sonarqube 的内部 PMD 运行器来检查为 Matlab 创建的自定义规则(XPath)吗?
    或者我是否必须编写一个额外的“解析器”来使用 Matlab 扩展 PMD?

非常感谢您!


编辑

好吧,我还在考虑。看起来,如果我想使用 PMD(使用 JavaCC,我可以生成解析器和词法分析器),我必须编写/扩展 matlab 语法。

但在我这样做之前,我是否也可以使用创建的语法和生成器(例如 ANTLR)为 Sonarqube 生成解析器和词法分析器?

0 投票
0 回答
783 浏览

sonarqube - SonarQube Eclipse 插件同步问题

SQ 版本:4.5.4 SQ Eclipse 插件:3.4

我们已经使用 SQ Eclipse 插件检查新的代码违规大约一个月了,一切都很顺利。从昨天开始,我们在分析代码时遇到了一个问题。

它给“同步问题”带来了问题。使用问题查询时出错。我还查看了 eclipse 日志以找到这背后的原因。在 Eclipse 日志中,我看到它在访问 URL 时出现读取超时问题。

http://ipaddress:9000/api/issues/search?resolved=false&pageSize=-1&componentRoots=PROJECT:PROJECTATTRIBUTE&pageIndex=1

当我在浏览器上点击上述 URL 时,大约需要 5 分钟才能得到响应。我检查了声纳日志以找到其背后的根本原因,并注意到执行查询大约需要 5 分钟。下面是声纳日志,我们可以看到执行查询花费了 324913 毫秒。

2015.08.06 23:38:18 INFO http-bio- . . -9000-exec-2 web[http] 329399ms GET /api/issues/search?resolved=false&pageSize=-1&componentRoots=PROJECT:PROJECTATTRIBUTE&pageIndex=1

2015.08.06 23:39:12 INFO http-bio- . .角色=?并且 gr.group_id 为 null ) authorized_projects on authorized_projects.root_project_id = root_snapshot_components.project_id WHERE (project_components.kee=?) and project_components.enabled = 1) authorized_input_components WHERE s.root_project_id = authorized_input_components.root_project_id 和 s.islast = 1 和 (s .root_snapshot_id = authorized_input_components.root_snapshot_id 和 s.path LIKE authorized_input_components.path || authorized_input_components.sid || '.%' ) 或 (s.id = authorized_input_components.sid) ) ) authorizedComponents.project_id=i.component_id 上的 authorizedComponents.project_id=i.component_id WHERE i。分辨率为 null ) where rownum <= ? - 参数是: , , <10000> kee=?) and project_components.enabled = 1 ) authorized_input_components WHERE s.root_project_id = authorized_input_components.root_project_id and s.islast = 1 and ( (s.root_snapshot_id = authorized_input_components.root_snapshot_id and s.path LIKE authorized_input_components.path || authorized_input_components.sid | | '.%' ) 或 (s.id = authorized_input_components.sid) ) ) authorizedComponents.project_id=i.component_id 上的 authorizedComponents WHERE i.resolution 为 null ) where rownum <= ? - 参数是: , , <10000> kee=?) and project_components.enabled = 1 ) authorized_input_components WHERE s.root_project_id = authorized_input_components.root_project_id and s.islast = 1 and ( (s.root_snapshot_id = authorized_input_components.root_snapshot_id and s.path LIKE authorized_input_components.path || authorized_input_components.sid | | '.%' ) 或 (s.id = authorized_input_components.sid) ) ) authorizedComponents.project_id=i.component_id 上的 authorizedComponents WHERE i.resolution 为 null ) where rownum <= ? - 参数是: , , <10000> ) 或 (s.id = authorized_input_components.sid) ) ) authorizedComponents.project_id=i.component_id 上的 authorizedComponents WHERE i.resolution 为 null ) where rownum <= ?- 参数是: , , <10000> ) 或 (s.id = authorized_input_components.sid) ) ) authorizedComponents.project_id=i.component_id 上的 authorizedComponents WHERE i.resolution 为 null ) where rownum <= ?- 参数是: , , <10000>

但是当我在 DB 上或通过 java 程序执行相同的查询时,只需不到 5 秒。

如果有人知道如何解决此问题,请帮助遇到类似问题的每个人。

0 投票
0 回答
439 浏览

web-services - Sonarqube WEB 服务 API,检索项目质量门的警报

如果我需要阅读项目的警报,我正在为发布管理构建一个 java 应用程序。声纳版本是 4.5.6。Web Service api,我正在使用以下端点。

我能够检索 Sonar 中可用的项目的所有版本。但我只需要最新版本。我需要检查的是最新版本的项目中是否存在任何警报。有什么线索吗?

0 投票
1 回答
644 浏览

sonarqube - 声纳插件:接收“包 org.sonar.api 不存在”

我编写了一个自定义插件来实现一些额外的检查,但是当我重新启动 SonarQube(使用 StartSonar.bat 文件)时,我收到以下错误:

我正在使用 SonarQube 版本 4.5.5,具有以下依赖项和构建插件:

0 投票
1 回答
112 浏览

sonarqube - 为什么在 SonarQube 升级后我无法再访问某些规则描述?

语境 :

迁移 sonarQube 后:3.73 -> 4.5.5

漏洞 :

当我使用声纳顶部的链接咨询一些规则时,描述不会出现,而是出现一个 javascript:

调查

当我们看到 javascript 时:

this.options.app.qualityProfiles -> 包含声纳的所有质量配置文件

键:this.model.get('qProfile') -> 获取到规则的质量配置文件链接的键

经过一些调查,我发现在数据库中找不到此规则的精确质量配置文件链接。所以我认为这是一个旧的和已删除的质量配置文件。

这可以解释为什么不存在于所有质量配置文件中的特定质量配置文件

问题

你见过这种虫子吗?

声纳如何复活这些旧的和删除的 qualityProfiles ?

我能做些什么 ?