You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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)
the project is still showing in the report with NaN% percentage
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=\"../../src/coverlet.core/,$(MSBuildThisFileDirectory)/src/coverlet.core/Reporters/**/*.cs\""/> </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)
The text was updated successfully, but these errors were encountered:
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)
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=\"../../src/coverlet.core/,$(MSBuildThisFileDirectory)/src/coverlet.core/Reporters/**/*.cs\""/> </Target>
The output:
Expected output:
or
Also the project should not be accounted for as part of the overall threshold calculations (in case there are other projects which are included)
The text was updated successfully, but these errors were encountered: