Skip to content

fix: use lcov --extract instead of --remove for coverage filtering - #21

Merged
DavidCozens merged 1 commit into
mainfrom
fix/lcov-extract-coverage
Apr 1, 2026
Merged

DavidCozens merged 1 commit into
mainfrom
fix/lcov-extract-coverage

Conversation

@DavidCozens

Copy link
Copy Markdown
Owner

Summary

  • Switch lcov coverage filtering from --remove (blacklist) to --extract Source/* (whitelist)
  • The --remove approach leaks C++ stdlib headers into the coverage report, inflating line count and dropping coverage percentage
  • Discovered during solid-syslog template merge — this fix prevents the same issue in all downstream repos

Test plan

  • CI coverage job passes with correct line/branch percentages
  • coverage.filtered.info only contains Source/ files

🤖 Generated with Claude Code

The --remove blacklist approach leaks C++ stdlib headers into the
coverage report. Switch to --extract with a Source/* whitelist which
is more robust and avoids needing --ignore-errors flags that lcov 1.x
doesn't support.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@DavidCozens
DavidCozens merged commit 600505a into main Apr 1, 2026
9 checks passed
@DavidCozens
DavidCozens deleted the fix/lcov-extract-coverage branch April 1, 2026 19:48
DavidCozens pushed a commit that referenced this pull request Apr 1, 2026
🤖 I have created a release *beep* *boop*
---


##
[1.1.0](v1.0.0...v1.1.0)
(2026-04-01)


### Features

* add Example program and BDD test skeleton
([#20](#20))
([9b05302](9b05302))
* backport infrastructure improvements from solid-syslog
([#18](#18))
([653f024](653f024))


### Bug Fixes

* use lcov --extract instead of --remove for coverage filtering
([#21](#21))
([600505a](600505a))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant