Documentation
¶
Overview ¶
Command coverage summarizes the Go tests' coverage from the LCOV report `bazel coverage --combined_report=lcov` writes: the total and each package's and file's share of lines covered. It writes the summary as JSON for the docs site's coverage page (--json), as Markdown for CI's job summary (--markdown), and fails when the total is below the floor (--floor), so coverage can't fall below it. tools/coverage.sh runs it.
The LCOV report has only code some test links: a Go library with no test target isn't in it, and so in neither the lines nor the total. Given the libraries (--libraries, their package directories), the summary lists those with no coverage at all as untested, so they're seen, not silently left out.
bazel run //tools/coverage -- --lcov=FILE [--json=FILE] [--markdown=FILE] [--floor=FILE] [--libraries=FILE]