sbt / sbt-jacoco

an sbt plugin for JaCoCo Code Coverage
https://scala-sbt.org/sbt-jacoco/
Eclipse Public License 1.0
123 stars 67 forks source link

Cobertura report formatter #225

Open chameleon82 opened 2 years ago

chameleon82 commented 2 years ago

This PR will add support for Cobertura output format.

It is useful in tools like gitlab-ci where cobertura can highlight code coverage in the PR ( addressed here )

Example of configuration:

  .settings(
    jacocoAggregateReportSettings := JacocoReportSettings(
      "Jacoco coverage aggregate report",
      None,
      JacocoThresholds(),
      Seq(JacocoCobertura.COBERTURA),
      "utf-8"
    )

output file:

target/scala-2.13/jacoco/report/aggregate/coverage-report/cobertura.xml

Checklist

chameleon82 commented 2 years ago

@xuwei-k could you help to review this pr?

chameleon82 commented 1 year ago

Hi @xuwei-k could you help to review again?

chameleon82 commented 1 year ago

@stringbean , @xuwei-k please help review this MR

chameleon82 commented 11 months ago

Hi @eed3si9n , may you help me to contribute into the project?