Directory Compare FCRS-1.0 /llms.txt
← Back to Directory

LCOV

$ lcov Community Low Risk
Linux Test Project · Code & DevOps · GPL-2.0-or-later · macos / linux

lcov collects and merges gcov coverage data into .info tracefiles, filters paths via --remove/--extract, and pairs with genhtml to generate HTML reports. While reliable and scriptable via --summary and --list, it outputs line-oriented text rather than JSON.

FCRS-1.0 Score
71 /100
Usable w/ Caveats
Medium Confidence
Zero-Friction Install
brew install lcov
CLI vs MCP Decision CLI Only

Local C/C++ coverage post-processor working directly on compiled build directories.

Agent-Readiness Checklist

— JSON Output
— Field Filtering
✓ Non-Interactive
— Dry-Run
— Read-Only Mode
— NO_COLOR Clean
✓ Self-Describing
— Official SKILL.md

Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.

FCRS-1.0 6-Dimension Breakdown

Agent-Readiness 15 / 25

Runs non-interactively and provides deterministic --summary and --list subcommands, but lacks native --json output and emits .info / ASCII tables.

  • No JSON output mode; uses .info tracefiles and text tables
  • Clean non-interactive exit codes and --quiet flag
Trust & Safety 20 / 25

Zero network/credential exposure and explicit --output-file targets, though --zerocounters mutates .gcda counter files in build dirs.

  • Local filesystem execution only
Setup & Portability 12 / 15

Available via brew install lcov and Linux distro packages, implemented in Perl; not natively supported on Windows outside WSL/MSYS2.

  • Perl-based CLI targeting macOS and Linux
Utility & Efficiency 11 / 15

Standard format bridge for C/C++ gcov and multi-suite merging (-a), though newer LLVM projects often prefer llvm-cov JSON.

  • .info tracefile format is widely consumed by CI coverage tools
Maintenance & Lineage 7 / 10

Maintained by the Linux Test Project (linux-test-project/lcov) with active v2.x releases.

  • Long-running Linux Test Project tool
Docs & Verifiability 6 / 10

Traditional man pages and --help output cover flags, though error-suppression rules in v2 can be dense.

  • Man page documentation (lcov.1)

Security, Auth & Guardrails

Auth Modes
No Auth
Credential Storage

No credentials required; operates strictly on local .gcno/.gcda and .info coverage files.

Side Effects
Read-Only Local Write
Cost & Quotas

GPL-2.0-or-later open-source Linux Test Project tool; free.

Copyable Guardrail for CLAUDE.md / AGENTS.md
# LCOV Agent Rules
- Use `lcov --summary <file>` or `lcov --list <file>` for read-only coverage checks.
- Pass `--ignore-errors` carefully only for known GCC/Clang version mismatches rather than hiding real errors.
- Use `lcov --remove` to strip `/usr/*` system headers before summarizing.

Agent-Ready Command Recipes

Safe Read-Only Queries

Print line and branch coverage summary
lcov --summary coverage.info

Reads coverage.info and prints aggregate line, function, and branch coverage percentages without writing files.

List per-file coverage breakdown
lcov --list coverage.info

Displays tabular per-file coverage metrics from an existing .info tracefile.

Controlled Writes & Previews

Capture gcov coverage from a build directory
lcov --capture --directory build --output-file coverage.info

Collects .gcda/.gcno coverage counters under build/ into coverage.info.

Strengths for Agents

  • + Produces portable .info coverage tracefiles understood by almost every CI platform.
  • + lcov --summary and --list provide quick read-only coverage checks.

Caveats & Pitfalls

  • ! Lacks native JSON output; agents must parse ASCII summary tables or .info records.
  • ! Perl dependency and primarily POSIX-focused (macOS/Linux); GCC vs Clang gcov mismatches often need --gcov-tool.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI