Skip to main content

Module coverage

Module coverage 

Source
Expand description

Coverage command - Parse and report code coverage from existing reports

Parses coverage reports in multiple formats:

  • Cobertura XML (GitLab/Jenkins standard)
  • LCOV (llvm-cov, gcov)
  • coverage.py JSON

Note: This command parses existing coverage reports. It does NOT run tests or generate coverage data. Use your test framework with coverage enabled first.

§Example

# Parse a Cobertura XML report
tldr coverage coverage.xml

# Parse LCOV with explicit format
tldr coverage coverage.lcov --format lcov

# Show per-file breakdown and uncovered code
tldr coverage coverage.xml --by-file --uncovered

# Check against 80% threshold
tldr coverage coverage.xml --threshold 80

Structs§

CoverageArgs
Parse and report code coverage from existing reports

Enums§

CoverageFormat
Coverage report format options
SortOrder
Sort order for files