Skip to content

scala-steward/sbt-jacoco

This branch is 1 commit ahead of, 28 commits behind sbt/sbt-jacoco:main.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

2b1130f · Apr 8, 2024
Dec 4, 2023
Apr 8, 2024
Mar 17, 2024
Oct 3, 2017
Oct 6, 2021
Jan 16, 2023
Nov 18, 2023
Sep 7, 2017
Oct 28, 2021
Mar 18, 2024
Oct 3, 2017

Repository files navigation

sbt-jacoco - Code Coverage via JaCoCo in sbt

Build Status Release Status SBT 1.0 version

This is an sbt plugin for code coverage analysis via JaCoCo. Supports uploading results to Coveralls, Codecov and Codacy.

Install the plugin by adding the following to project/plugins.sbt:

addSbtPlugin("com.github.sbt" % "sbt-jacoco" % "<version>")

And then execute the plugin with sbt jacoco. This will instrument and run the unit tests and output the coverage metrics:

[info] ------- Jacoco Coverage Report --------
[info]
[info] Lines: 66.67% (>= required 0.0%) covered, 2 of 6 missed, OK
[info] Instructions: 83.54% (>= required 0.0%) covered, 13 of 79 missed, OK
[info] Branches: 0% (>= required 0.0%) covered, 0 of 0 missed, OK
[info] Methods: 57.14% (>= required 0.0%) covered, 3 of 7 missed, OK
[info] Complexity: 57.14% (>= required 0.0%) covered, 3 of 7 missed, OK
[info] Class: 50% (>= required 0.0%) covered, 2 of 4 missed, OK
[info]
[info] Check /home/example/jacoco-test/target/scala-2.11/jacoco/report for detailed report

A detailed HTML report will also be generated in the directory shown that includes line level details of coverage.

See the docs for details on configuration options.

About

JaCoCo Code Coverage plug-in for sbt.

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Scala 87.4%
  • HTML 12.6%