我正在使用JaCoCo进行代码覆盖.使用junit创建单元测试报告并正确导入它们,以便正确显示单元测试信息.该问题是,我得到的错误消息: 大约每测试覆盖无资料.并且代码覆盖率显示单元测试,集成测试和整体覆盖率的值0%.我检查了sonar-project.properties中的所有必需信息,如binary,src,tests等.
我正在使用:
- SonarQube 4.5.1
- SonarRunner 2.4
- MySQL
- junit 4.1.1
- jacoco 0.7.2
jacoco.exec位于项目基目录中的文件/目标中.
下面你可以看到sonar-project.properties:从我的角度来看,所有必要的路径都设置正确.(即二进制,src,测试)
Comma-separated paths to directories with sources (required)
sonar.sources=src
compiled code
sonar.java.binaries=class
source code of unit tests
sonar.tests=test/src
Comma-separated paths to files with third-party libraries (JAR files in the case of Java)
sonar.java.libraries=jar
Language
sonar.language=java
Encoding of the source files
sonar.sourceEncoding=UTF-8
Additional parameters
sonar.my.property=value
Set Project Base
sonar.projectBaseDir=C:/snapshots/steffen_latest/software/java
Tells SonarQube to reuse existing reports for unit tests execution and …Run Code Online (Sandbox Code Playgroud) 我们已经使用ESLint确定了应该用于JavaScript代码的规则.现在我们想要像使用Checkstyle for JavaCode一样将ESLint集成到SonarQube中.
在以下链接中描述了为什么SonarQube不想为ESLint提供插件:http: //www.sonarqube.org/sonarqube-javascript-plugin-why-compete-with-jslint-and-jshint/
在SonarQube中还没有插件冷杉ESLint吗?这不是营销策略的一部分吗?还有一个Checkstyle,FindBugs等插件......为什么SonarQube突然停止支持其他代码分析工具的集成?