Skip to content

Code-coverage collector referenced but never invoked in CI #1608

Description

@Widthdom

Summary

coverlet.collector is referenced in CodeIndex.Tests.csproj but the CI pipeline does not actually invoke dotnet test --collect:"XPlat Code Coverage", does not upload a coverage report artifact, and does not enforce a coverage threshold. The dependency is dead weight.

Where

  • tests/CodeIndex.Tests/CodeIndex.Tests.csproj:13 (coverlet reference)
  • .github/workflows/dotnet.yml:157-166 (test step does not collect coverage)

Why it matters

Coverage is a useful regression net when wired up. Today contributors and reviewers cannot tell which paths are exercised, and lurking gaps (e.g. error-handling branches) are invisible. Wiring it up is mostly free since the package is already there.

Suggested approach

(1) Run dotnet test --collect:"XPlat Code Coverage" in CI. (2) Upload coverage.cobertura.xml as an artifact. (3) Optionally publish to a coverage service or add a PR-comment summary. (4) Set a non-blocking floor (e.g. "warn if coverage drops more than 2% vs main") rather than a hard gate to start.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions