Skip to content
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

Coverage report which contains a completely excluded project with wrong percentage, affects the threshold requirements as well #74

Closed
ido-namely opened this issue May 3, 2018 · 3 comments

Comments

@ido-namely
Copy link
Contributor

ido-namely commented May 3, 2018

When excluding a whole project (using /Exclude flag, but I'm guessing after reviewing the code this could happen if using the label exclusion method as well for all project)

  1. the project is still showing in the report with NaN% percentage
  2. The overall percentage of the report isn't calculated correctly and/or the threshold calculations aren't not correct.

To reproduce:
dotnet test test\coverlet.core.tests\coverlet.core.tests.csproj -c Release /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:Exclude=\"../../src/coverlet.core/\"

If you had this to the build.proj before creating the nugt package it would be easier to reproduce:
<Target Name="RunTestsWithExclude" AfterTargets="RunTests"> <Exec Command="dotnet test --no-build $(MSBuildThisFileDirectory)test\coverlet.core.tests\coverlet.core.tests.csproj -c $(Configuration) /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:Exclude=\&quot;../../src/coverlet.core/,$(MSBuildThisFileDirectory)/src/coverlet.core/Reporters/**/*.cs\&quot;"/> </Target>

The output:

Module Coverage
coverlet.core NaN%

Expected output:

Module Coverage
coverlet.core 0%

or

Module Coverage

Also the project should not be accounted for as part of the overall threshold calculations (in case there are other projects which are included)

@tonerdo
Copy link
Collaborator

tonerdo commented May 5, 2018

#73 fixes this

@tonerdo tonerdo closed this as completed May 5, 2018
@ido-namely
Copy link
Contributor Author

@tonerdo Is there going to be a new release soon that would include this fix?
Thanks!

@tonerdo
Copy link
Collaborator

tonerdo commented May 17, 2018

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

No branches or pull requests

2 participants