galexandre / sonar-cobertura

Cobertura plugin for SonarQube
GNU General Public License v3.0
30 stars 26 forks source link

Plugin should be updated to use SensorContext::newCoverage instead. #13

Closed gvasquez95 closed 5 years ago

gvasquez95 commented 6 years ago

Context:

Logs from Jenkins v2.82:

[INFO] Sensor CoberturaSensor [cobertura]
[INFO] parsing /var/lib/jenkins/workspace/planning/target/site/cobertura/coverage.xml
[WARNING] Coverage measure for metric 'lines_to_cover' should not be saved directly by a Sensor. Plugin should be updated to use SensorContext::newCoverage instead.
[WARNING] Coverage measure for metric 'uncovered_lines' should not be saved directly by a Sensor. Plugin should be updated to use SensorContext::newCoverage instead.
[WARNING] Coverage measure for metric 'coverage_line_hits_data' should not be saved directly by a Sensor. Plugin should be updated to use SensorContext::newCoverage instead.
[WARNING] Coverage measure for metric 'conditions_to_cover' should not be saved directly by a Sensor. Plugin should be updated to use SensorContext::newCoverage instead.
[WARNING] Coverage measure for metric 'uncovered_conditions' should not be saved directly by a Sensor. Plugin should be updated to use SensorContext::newCoverage instead.
[WARNING] Coverage measure for metric 'conditions_by_line' should not be saved directly by a Sensor. Plugin should be updated to use SensorContext::newCoverage instead.
[WARNING] Coverage measure for metric 'covered_conditions_by_line' should not be saved directly by a Sensor. Plugin should be updated to use SensorContext::newCoverage instead.

Should I provide any other details?

galexandre commented 6 years ago

Hi @gvasquez-waypoint ,

I will try to have a look during the week. If you want to try to develop a fix you are welcome ;)

galexandre commented 6 years ago

Hi

A little update, I check the code and a refactoring of couple of class is required. I will need time to do that.

Regards,

Geoffrey

herenyi commented 6 years ago

I think my pull request should solve this issue