ModuleBuilder
ModuleBuilder copied to clipboard
Add a -CoverageFile for Convert-CodeCoverage
As a module author In order to understand my code coverage I need to use CodeCov.io and other such tools
Basically I just want to overwrite Pester's coverage file with one based on the modified output of Convert-CodeCoverage. If that's already possible by piping this to some Pester functions, can you put an example of how to do it in the help for Convert-CodeCoverage so others can figure out how -- or better yet, just add a parameter and do it yourself...
There is code here that might help with this issue. Happy to see this functionality be implemented in ModuleBuilder instead so that we can just call a command from the task. Anyway, hope anything can be reused or used as an inspiration.
https://github.com/gaelcolas/Sampler/blob/bc25ba558383d3ddba7ded9a2e51233f2bc9d4e7/.build/tasks/JaCoCo.coverage.build.ps1#L328-L457
The main activities the task does:
- Coverts hits and misses using this modules'
ConvertTo-SourceLineNumber(but uses the aliasConvert-LineNumber) - Create a new JaCoCo file from the converted coverage.
- Updated the JaCoCo statistics in the new JaCoCo file.