coverage
The coverage tool allows to generate and validate a coverage report for a Bazel workspace.
It allows you to fine-tune line and branch coverage threshold per file that must be reached for the report to pass.
This tool is based on bazel coverage and because of that it supports multiple programming
languages (e.g.: Rust, C++ or Java).
Usage
usage: coverage [-h] [--target TARGET] [--lines LINES] [--branch BRANCH]
Generate unit test coverage report for Bazel workspace.
options:
-h, --help Show this help message and exit.
--target TARGET Bazel test target.
--lines LINES Threshold for the line coverage report to pass (in
percentage). If any line coverage for a file is below
threshold, script fails.
--branch BRANCH Threshold for the branch coverage report to pass (in
percentage). If any branch coverage for a file is below
threshold, script fails.
Example
devkit/coverage --lines 90 --branch 80