公制' it_lines_cover'不应由传感器计算

时间:2016-12-09 11:26:04

标签: sonarqube sensor metric

我在使用SonarQube Scanner 2.8解析phpunit覆盖率报告时遇到错误,并显示以下消息:

Metric 'it_lines_to_cover' should not be computed by a Sensor

提前致谢,

版本

10:42:57.262 INFO: SonarQube Scanner 2.8
10:42:57.262 INFO: Java 1.8.0_111 Oracle Corporation (64-bit)
10:42:57.262 INFO: Linux 3.13.0-103-generic amd64
10:43:08.803 DEBUG:   * PHP 2.9.1.1705 (php)

错误日志

10:43:18.046 INFO: Sensor PHP sensor
10:43:18.420 INFO: 78 source files to be analyzed
10:43:21.533 INFO: 78/78 source files have been analyzed
10:43:21.543 INFO: PHPUnit xml test report not found: tests/build
/logs/junit_unit.xml
10:43:21.544 INFO: PHPUnit xml unit test coverage report not found: 
tests/build/logs/clover-unit.xml
10:43:21.544 INFO: Analyzing PHPUnit integration test coverage report: 
tests/build/logs/clover-integration.xml with PHPUnit IT Coverage Result Parser
10:43:21.544 DEBUG: Parsing file: /home/travis/build/armadito
/glpi/plugins/armadito/tests/build/logs/clover-integration.xml
10:43:23.079 DEBUG: Coverage metrics have not been set on 'index.php': 
default values will be inserted.
------------------------------------------------------------------------
10:43:23.084 INFO: EXECUTION FAILURE
10:43:23.084 INFO: 
------------------------------------------------------------------------
10:43:23.515 ERROR: Error during SonarQube Scanner execution
java.lang.UnsupportedOperationException: Metric 'it_lines_to_cover' should not be computed by a Sensor
at org.sonar.scanner.sensor.DefaultSensorStorage.saveMeasure(DefaultSensorStorage.java:240)
at org.sonar.scanner.sensor.DefaultSensorStorage.store(DefaultSensorStorage.java:213)
at org.sonar.api.batch.sensor.measure.internal.DefaultMeasure.doSave(DefaultMeasure.java:93)
at org.sonar.api.batch.sensor.internal.DefaultStorable.save(DefaultStorable.java:43)
at org.sonar.plugins.php.phpunit.PhpUnitCoverageResultParser.saveMeasureForMissingFiles(PhpUnitCoverageResultParser.java:129)
at org.sonar.plugins.php.phpunit.PhpUnitCoverageResultParser.parseFile(PhpUnitCoverageResultParser.java:102)
at org.sonar.plugins.php.phpunit.PhpUnitCoverageResultParser.parse(PhpUnitCoverageResultParser.java:84)
at org.sonar.plugins.php.phpunit.PhpUnitService.parseReport(PhpUnitService.java:74)
at org.sonar.plugins.php.phpunit.PhpUnitService.execute(PhpUnitService.java:60)
at org.sonar.plugins.php.PHPSensor.processCoverage(PHPSensor.java:142)
at org.sonar.plugins.php.PHPSensor.execute(PHPSensor.java:132)

1 个答案:

答案 0 :(得分:1)

实施https://jira.sonarsource.com/browse/SONARPHP-658后,此消息将消失。它计划在下一版本的PHP插件中发布。