Not maintained: Please look at forks instead!
bazel-coverage-report
is a multi-language coverage report generator for
Bazel. It is based on genhtml.
See the example report generated
for the //test/...
targets.
Bug reports and feature requests are welcome.
In your WORKSPACE:
git_repository(
name = "hchauvin_bazel_coverage_report",
remote = "https://github.com/hchauvin/bazel-coverage-report.git",
commit = "{HEAD}",
)
load("@hchauvin_bazel_coverage_report//report:defs.bzl", "bazel_coverage_report_repositories")
bazel_coverage_report_repositories() # lcov, ...
Then:
- Generate coverage data with
bazel coverage //your/targets/... --instrumentation_filter=<...>
- Build the coverage report generator:
bazel build @hchauvin_bazel_coverage_report//report:bin
- Generate the report:
bazel-bin/external/hchauvin_bazel_coverage_report/report/bin --dest_dir=<dest dir>
- C, C++
- Golang
- Javascript, Typescript
- Java, Kotlin
- R
See ./WORKSPACE
for the version of the rules that are supported. Some of
these versions are pending Push Requests.