Skip to content

report

The report command analyzes a pre-generated coverage profile and evaluates policies. Use this when you have coverage data from a previous run or CI artifact.

Terminal window
coverctl report [flags]
FlagDescriptionDefault
-c, --configConfig file path.coverctl.yaml
-p, --profileCoverage profile path.cover/coverage.out
-d, --domainFilter to specific domain (repeatable)all domains
-o, --outputOutput format: text, json, htmltext
FlagDescription
--uncoveredShow only files with 0% coverage
--diff <ref>Show coverage for files changed since git ref
--merge <profile>Merge additional coverage profile (repeatable)
--show-deltaShow coverage change from previous run
--historyHistory file path for delta display
Terminal window
# Analyze default profile
coverctl report
# Analyze specific profile
coverctl report -p coverage.out
Terminal window
# JSON output for CI/parsing
coverctl report -o json
# HTML report
coverctl report -o html > coverage.html
Terminal window
# Show only uncovered files
coverctl report --uncovered
# Show coverage for changed files only
coverctl report --diff origin/main
Terminal window
# Merge unit and integration profiles
coverctl report --merge integration.out --merge e2e.out
Terminal window
# Show change from previous run
coverctl report --show-delta
# Use custom history file
coverctl report --show-delta --history .coverage-history.json
Domain Coverage Required Status
─────────────────────────────────────
core 87.3% 85% PASS
api 81.2% 80% PASS
cli 76.4% 75% PASS
─────────────────────────────────────
Overall 82.1% 75% PASS
{
"passed": true,
"domains": [
{
"name": "core",
"covered": 1234,
"total": 1414,
"percent": 87.3,
"required": 85,
"status": "pass"
}
],
"files": [
{
"file": "internal/core/service.go",
"covered": 45,
"total": 50,
"percent": 90.0
}
]
}

Generates a visual report with:

  • Domain summary table
  • Per-file coverage breakdown
  • Color-coded status indicators
  • Sortable columns
Terminal window
coverctl report -o html > coverage.html
open coverage.html
Terminal window
# Download coverage artifact
curl -O https://ci.example.com/artifacts/coverage.out
# Analyze without running tests
coverctl report -p coverage.out -o json
Terminal window
# Show coverage for files in PR
coverctl report --diff origin/main
# Combined with HTML output
coverctl report --diff origin/main -o html > pr-coverage.html

When you have separate coverage profiles (unit, integration, e2e):

Terminal window
coverctl report \
-p unit.out \
--merge integration.out \
--merge e2e.out
CodeMeaning
0Report generated successfully
1Policy violation detected
2Invalid configuration or arguments
3Profile parsing failed