Malinskiy / danger-jacoco

danger plugin to check against jacoco xml reports
MIT License
18 stars 24 forks source link

Class coverage is below minimum. Improve to at least 0% Message keep showing on PRs. #48

Open clementcasa opened 3 years ago

clementcasa commented 3 years ago

Hello, we have implemented Danger-jacoco on our project but we have an issue with the plugin

The message Class coverage is below minimum. Improve to at least 0% keep showing on our PRs while we specify that the minimum coverage of classes is 0%. Here is the full output :

Screenshot 2021-06-15 at 11 49 25

Plugin Usage

Here is the configuration of jacoco in our Dangerfile :

# Jacoco
jacoco.minimum_project_coverage_percentage = 70
jacoco.minimum_package_coverage_map = {
'com/citygoo/app/data/fixtures/' => 0,
'com/citygoo/app/data/models/domainMappingProtocols/' => 80,
'com/citygoo/app/data/models/entities/' => 0,
'com/citygoo/app/data/modules/exceptions/' => 80,
'com/citygoo/app/data/repositories/' => 80,
'com/citygoo/app/data/utils/' => 0,
'com/citygoo/app/data/vendors/' => 80,
'com/citygoo/app/domain/' => 95,
#Presenter
'com/citygoo/app/presenter/models/' => 0,
'com/citygoo/app/presenter/modules/' => 70,
'com/citygoo/app/presenter/protocols/' => 70,
'com/citygoo/app/presenter/utils/' => 0
}
jacoco.minimum_class_coverage_percentage = 0
jacoco.report(
  "app/build/reports/jacoco/jacocoDebugTestReport/jacocoDebugTestReport.xml",
  "http://www.google.com",
  fail_no_coverage_data_found: false
)

Version Used

danger-jacoco v0.1.4 jacoco Gradle Plugin 0.8.7 danger 5.13.0

Malinskiy commented 3 years ago

hey @gueut, thanks for raising this issue.

I'd like to point your attention to the output of the configuration: your package 'com/citygoo/app/presenter/modules/' requires coverage above 70 and in your report for RequestDetailsPresenterImpl it's 61. While the error message is not helpful in this case, the actual problem is indicated by the yellow exclamation sign in the table below this message.

If you'd like to change the error message, I'm happy to review a PR with the necessary changes.

clementcasa commented 3 years ago

Hi @Malinskiy Thank you for you answer 🙂