coverlet-coverage / coverlet

Cross platform code coverage for .NET
MIT License
2.93k stars 386 forks source link

Feature Request: Get coverage since specified commit target #1562

Open tomdaniel-it opened 7 months ago

tomdaniel-it commented 7 months ago

I see this functionality was already asked about in #1148 , but since this issue was closed, I thought I'd open a Feature Request for it.
This issue was also created as reaction to performance issues. While this is also an advantage, my feature request focuses on other benefits that this feature would introduce.

Feature request: An extra option to define a commit target to compare against, so that only for the changes since this commit, coverage will be created. This would mainly be used in CI/CD pipelines.

Why: In greenfield projects, it is easy to setup the constraint of having a minimum % of coverage, otherwise the build fails and you can't merge your pull requests. But in reality, this isn't as easy. Most of the times developers are working with already existing code bases which are not covered by unit tests. The only options are:

This feature would introduce two new benefits (besides performance):

This feature request was inspired by the since option flag in .NET Stryker.

Bertk commented 7 months ago

Hi, thank you for the request but comparing code coverage of SCM branches is not in scope of coverlet but is available in CI extensions or code quality assurance tools.

e.g.

github-actions[bot] commented 3 months ago

This issue is stale because it has been open for 3 months with no activity.