Skip to content

Add MSVC code coverage script and skill#309

Open
parth21999 wants to merge 1 commit intomasterfrom
paaggarwal/add-coverage-script
Open

Add MSVC code coverage script and skill#309
parth21999 wants to merge 1 commit intomasterfrom
paaggarwal/add-coverage-script

Conversation

@parth21999
Copy link
Member

Summary

  • Add run_coverage.ps1 to .github/scripts/ - a PowerShell script that runs MSVC code coverage using Microsoft.CodeCoverage.Console.exe (VS Enterprise), collects Cobertura XML, and displays per-file/per-function coverage with uncovered line ranges
  • Add run-coverage skill to .github/skills/ - instructions for AI assistants on how to use the coverage script

Test plan

  • Run script against a unit test executable and verify Cobertura XML output is generated
  • Verify -SourceFilter wildcard patterns correctly filter source files
  • Verify -ShowFunctions and -ShowUncoveredLines flags produce expected output
  • Verify script errors gracefully when VS Enterprise is not available

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@@ -0,0 +1,316 @@
<#
.SYNOPSIS
Copy link
Member

@dcristoloveanu dcristoloveanu Feb 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have you looked if there is already a parser for the coverage? I have not looked, but it is a good idea to not reinvent and maintain if we can. #Resolved

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I looked at a few options. All the parsers generate extensive reports that then need to be parsed again to get the actual list of uncovered lines.

I think it's just better to get the info from the source of truth (cobertura report) than to generate another html/md report and parse that.

dcristoloveanu
dcristoloveanu previously approved these changes Feb 7, 2026
Copy link
Member

@dcristoloveanu dcristoloveanu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

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.

2 participants