Replies: 3 comments 1 reply
-
Regarding your questions:
|
Beta Was this translation helpful? Give feedback.
-
Hi @danielpalme, I am looking to create a plugin with a custom report that generates something similar to the existing HTML reports, but only including lines from the git diff: e.g. Motivation: when generating coverage reports in CI for pull requests, it makes more sense to only show the lines changed in that pull request, rather than the entire codebase. If the PR author wants to see what is/isn't covered from their changes, it can be quite hard to find if the report is for the whole codebase. The CI pipeline creates the reports, and uploads them to a server where they are served via HTTP, and a link to the report is added to the PR (as a comment or similar). A python tool exists for this, but I would rather not introduce a dependency on python & another tool just for this, and would prefer to have the style of report similar to what is generated by the dotnet ReportGenerator tool. I don't have a problem trying to implement this myself, but have a question: I would like this plugin to be flexible and have 'options' passed into it, such as which branch to diff against (override |
Beta Was this translation helpful? Give feedback.
-
Hi @EricEzaM You can access the command line parameters trough Environment.GetCommandLineArgs() |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I noticed that ReportGenerator supports setting
minimumCoverageThresholds:lineCoverage
, which is ok for validating overall coverage. However, I couldn’t find a way to calculate or enforce coverage deltas across the report history.In most CI pipelines, I aim to fail the build if new or changed code doesn’t meet a defined coverage threshold, rather than basing the decision on the overall project coverage.
Is there currently a way to:
If not, is there an alternative approach or best practice you’d recommend for this use case?
Beta Was this translation helpful? Give feedback.
All reactions