-
Notifications
You must be signed in to change notification settings - Fork 387
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Branch Enhancements #69
Branch Enhancements #69
Conversation
Update README.md
ensure instrumentation code becomes the new target
Check if the file HitsFilePath exists
Fix errors when using multiple referenced libraries.
CalculateCoverage: Fix file not foundexception
Check for totalLines to be 0 in CoverageSummary.
fix open cover reporter so that it uses unique ids over multiple modules
Fixes assembly resolution so it scans the module directory as well.
Minor refactorings elsewhere: * Inline functions to local functions. * Extract method for obtaining backup module path. * Avoid hard-coding coverlet assembly name.
As someone who never used code coverage it was not clear to me until I've read it in this post: https://medium.com/@tonerdo/setting-up-coveralls-with-coverlet-for-a-net-core-project-2c8ec6c5dc58
[Skip CI] Specify what project to add the NuGet
Additional coverage reporting for properties and nested types
@tonerdo - Merge conflicts fixed. |
|
||
var pathInstr = Instruction.Create(OpCodes.Ldstr, _result.HitsFilePath); | ||
var markInstr = Instruction.Create(OpCodes.Ldstr, marker); | ||
var callInstr = Instruction.Create(OpCodes.Call, processor.Body.Method.Module.ImportReference(typeof(CoverageTracker).GetMethod("MarkExecuted"))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we change the ImportReference()
call to use the one-off _markExecutedMethodLoader.Value
too? Other than that this looks good!
Wow, I royally screwed something up here. I was working on my work laptop and somehow messed up the git history for this repo. I'm probably going to close this PR, delete my fork, and open a new PR. |
Description
This PR covers a lot of changes in order to better support branch coverage. The main purpose of this refactor is two-fold. First, to add improved support for branch coverage. Second, to improve the output of the 3 supported report formats by adding previously missing information.
At a high level, this PR covers the objectives by:
CoverageDetails
result model fromCoverageSummary
in report generators in lieu of manually tracking and incrementing visits and counts.