- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我使用 SonarQube:版本 7.0(内部版本 36138)-LGPL v3-社区。
我想导入 SonarQube 中 SoapUI 测试套件执行的结果,如本页所述:
( https://docs.sonarqube.org/pages/viewpage.action?pageId=1442166 )
我运行 SoapUI 测试并以 JUnit xml 格式 (Test-xxx.xml) 生成结果。我
然后,我使用此变量 sonar.junit.reportPaths 将测试执行报告导入到 SonarQube 中。
但是当我使用 Sonar 步骤结束运行构建时,Sonar 分析器不会获取 Test-xxx.xml 文件(sonar-maven-plugin:3.4.0.905:sonar):
(.../maven-3.5/bin/mvn -Dsonar.login=token -Dsonar.junit.reportPaths=target/report -Dsonar.host.url= http://host:9000 Sonar : Sonar )
我是否忘记了任何配置?
我附加了 Sonar 分析器日志的片段
[INFO] --- jacoco-maven-plugin:0.8.0:prepare-agent (prepare-it-agent) @ edp-xxx-dev ---
[INFO] jacoco.agent.it.arg set to -javaagent:/var/data/jenkins/.m2/repository/org/jacoco/org.jacoco.agent/0.8.0/org.jacoco.agent-0.8.0-runtime.jar=destfile=/var/data/jenkins/workspace/xxx/target/jacoco-it.exec,append=true
[INFO]
[INFO] --- maven-failsafe-plugin:2.20.1:integration-test (integration-test-failsafe) @ edp-xxx-dev ---
[INFO] No tests to run.
[INFO]
[INFO] --- maven-failsafe-plugin:2.20.1:verify (verify-failsafe) @ edp-xxx-dev ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 8.575 s
[INFO] Finished at: 2018-02-20T16:07:54+01:00
[INFO] Final Memory: 29M/294M
[INFO] ------------------------------------------------------------------------
[EDP-xxx-DEV] $ /var/data/jenkins/maven-3.5/bin/mvn -Dsonar.login=token -Dsonar.junit.reportPaths=target/report -Dsonar.host.url=http://host:9000 sonar:sonar
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for fr.yyy:edp-xxx-dev:pom:0.0.1
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-failsafe-plugin is missing. @ line 75, column 15
[WARNING] 'build.plugins.plugin.version' for org.jacoco:jacoco-maven-plugin is missing. @ line 105, column 15
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building edp-xxx-dev 0.0.1
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- sonar-maven-plugin:3.4.0.905:sonar (default-cli) @ edp-xxx-dev ---
[INFO] User cache: /var/data/jenkins/.sonar/cache
[INFO] SonarQube version: 7.0.0
[INFO] Default locale: "en_US", source code encoding: "UTF-8" (analysis is platform dependent)
[INFO] Publish mode
[INFO] Load global settings
[INFO] Load global settings (done) | time=223ms
[INFO] Server id: AWFlfLYJl4_5JAEp_gm4
[INFO] User cache: /var/data/jenkins/.sonar/cache
[INFO] Load plugins index
[INFO] Load plugins index (done) | time=102ms
[INFO] Load/download plugins
[INFO] Load/download plugins (done) | time=18ms
[INFO] Process project properties
[INFO] Load project repositories
[INFO] Load project repositories (done) | time=83ms
[INFO] Load quality profiles
[INFO] Load quality profiles (done) | time=56ms
[INFO] Load active rules
[INFO] Load active rules (done) | time=1565ms
[INFO] Load metrics repository
[INFO] Load metrics repository (done) | time=83ms
[WARNING] SCM provider autodetection failed. No SCM provider claims to support this project. Please use sonar.scm.provider to define SCM of your project.
[INFO] Project key: fr.yyy:edp-xxx-dev
[INFO] ------------- Scan edp-xxx-dev
[INFO] Load server rules
[INFO] Load server rules (done) | time=685ms
[INFO] Base dir: /var/data/jenkins/workspace/[DIR]/[SUB_DIR]/EDP-xxx-DEV
[INFO] Working dir: /var/data/jenkins/workspace/[DIR]/[SUB_DIR]/EDP-xxx-DEV/target/sonar
[INFO] Source paths: pom.xml
[INFO] Source encoding: UTF-8, default locale: en_US
[INFO] Index files
[INFO] 1 file indexed
[INFO] Quality profile for xml: Sonar way
[INFO] Sensor SonarJavaXmlFileSensor [java]
[INFO] 1 source files to be analyzed
[INFO] Sensor SonarJavaXmlFileSensor [java] (done) | time=776ms
[INFO] Sensor XML Sensor [xml]
[INFO] 1/1 source files have been analyzed
[INFO] Sensor XML Sensor [xml] (done) | time=243ms
[INFO] Sensor Zero Coverage Sensor
[INFO] Sensor Zero Coverage Sensor (done) | time=20ms
[INFO] Sensor CPD Block Indexer
[INFO] Sensor CPD Block Indexer (done) | time=0ms
[INFO] No SCM system was detected. You can use the 'sonar.scm.provider' property to explicitly specify it.
[INFO] Calculating CPD for 0 files
[INFO] CPD calculation finished
[INFO] Analysis report generated in 181ms, dir size=36 KB
[INFO] Analysis reports compressed in 21ms, zip size=10 KB
[INFO] Analysis report uploaded in 32ms
[INFO] ANALYSIS SUCCESSFUL, you can browse http://host:9000/dashboard/index/fr.yyy:edp-xxx-dev
[INFO] Note that you will be able to access the updated dashboard once the server has processed the submitted analysis report
[INFO] More about the report processing at http://host:9000/api/ce/task?id=AWGzwew1O8d_lgjIaxfY
[INFO] Task total time: 6.899 s
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 9.558 s
[INFO] Finished at: 2018-02-20T16:08:06+01:00
[INFO] Final Memory: 23M/336M
[INFO] ------------------------------------------------------------------------
最佳答案
仅当您的模块中存在与报告中的测试相对应的类名称时,才会导入您使用 sonar.junit.reportPaths 指定的报告中的测试结果。
因此,如果没有类与报告中的测试相对应,SonarQube 中将不会显示任何内容(此外,您希望 SonarQube 准确显示什么?)。
关于java - 将 SoapUI JUnit 结果导入 SonarQube,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48883196/
我找到了 Using SonarQube in Eclipse 并将提出一个针对 Python 的单独问题。但在这里我想更一般地询问如何在提交之前处理单个源文件时,如何使用 SonarQube 作为
我们之前在现已关闭的 SonarQube Users mailing list 上讨论过这个问题. 通过优化Postgre DB换了半周左右问题解决,然后又出现问题。 我们正在使用 Jenkins 1
自从更新到5.x以来,由于“权限不足”问题,我们的许多构建作业现在都失败了。如here中所述,应该在SonarQube 5.1中解决该问题,但实际上它没有得到解决,或者存在另一个与我们当前运行Sona
我已经有一段时间没有看过 SonarQube 了。最新版本看起来很有趣。 上次我查看这个产品时,他们有一个网站,他们通过 SonarQube 进程推送了各种流行的开源库(如 Tomcat、Active
在 SonarQube (5.6.4 LTS) 中有一个后台(项目分析)任务可视化的 View :(管理/项目/后台任务)。似乎任务是按顺序运行的(一次一个)。有些任务可能需要 40 分钟,这意味着其
今天我正在用 mysqldump 备份 MySQL,但我不确定是否需要从/opt/sonar 保存一些文件。请你能帮我一些指示吗? 除了 MySQL,我还需要在 Sonar 中备份什么? 最佳答案 我
我们希望每个用户都能收到一封关于他们在此分析中引入的新问题的电子邮件。 我在这里找到了这个请求,说它应该已经成为可能: http://jira.sonarsource.com/browse/SONAR
是否可以从一个项目导出代码覆盖率和 sonarqube 问题的排除项并导入到其他项目? 最佳答案 排除项是项目属性,因此您可以使用 /api/properties Web 服务自动从一个项目获取这些属
当 Sonar 抛出一个特定的编码规则违规时,开发人员(或就此而言任何授权用户)如何忽略它?假设弹出一条规则“不遵循文件命名约定”,有没有办法可以将其声明为误报并单击某个按钮以确保不会显示该编码规则违
我希望更改规则“左花括号应位于代码行的末尾”,因为我们使用了不同的约定。 提前致谢! 最佳答案 由于 Sonarqube 打算在规则上提供尽可能少的配置:您应该使用 key squid:LeftCur
我正在寻找一种在 SonarQube 中组织项目的方法,并发现我必须为此付费:http://www.sonarqube.org/bring-a-new-dimension-to-sonar-with-
SonarQube Server 5.1.2, Sonar-Runner 2.4 正如 Multi-moduleProject 中提供的那样我创建了一个项目结构 Accounts | ->invoic
在 SonarQube 的 Web UI 中,您可以根据多个条件过滤问题。但似乎没有一个是可以否定的。 我喜欢找出所有关键问题,即 不是 规则xyz。我目前从 Web UI 中只能看到选择我喜欢看的东
我已经设置了一个 jenkins-sonarqube-github 集成工作流程,其中 git 存储库中的拉取请求会触发一个 webhook,该 webhook 会启动一个 jenkins 作业,该作
有没有人设法让 SonarQube 与 Upsource 合作?我已经为 SonarQube 下载了 upsource-sonar-plugin-0.1-SNAPSHOT.jar 插件,并在我通过/s
我正在使用JaCoCo进行代码覆盖。单元测试报告是使用junit创建的,并且已正确导入,因此可以正确显示单元测试信息。 问题是,我收到错误消息: 没有有关每次测试的覆盖率的信息。 ,代码覆盖率显示单元
我有一个 Sonarcloud 帐户,我正在尝试使用 SonarQube.Scanner.MSBuild.exe 分析 Visual Studio 解决方案。我创建了一个 token 并将其作为 So
似乎有最新版本的新规则可用。 我有几个问题报告为“应正确使用 Printf 样式的格式字符串 (squid:S3457)” 我不明白 my case 中的描述和错误是什么: LOGGER.info("
这个问题我看了很多帖子,但是没找到答案所以才问。我将 Sonarqube 从 4.5 升级到 5.6,它工作正常,但质量配置文件是空的。我尝试使用备份/恢复选项恢复一个,但规则被忽略: image .
我实现了 SonarQube在服务器上,我做了大部分配置 远程 .因此,无论何时安装插件,都会重新启动 SonarQube是必需的,每次我都必须显式(手动)重启 SonarQube服务器 . 有没有办
我是一名优秀的程序员,十分优秀!