coverage

command
v0.9.12 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 13, 2026 License: Apache-2.0 Imports: 14 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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]

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL