Skip to content

Commit bb1f388

Browse files
authored
Merge pull request #406 from MarcoRossignoli/downgradelog
Downgrade verbosity log for hit files not found
2 parents b389912 + 6ba4081 commit bb1f388

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

build.proj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
</Target>
2525

2626
<Target Name="RunTests" AfterTargets="CopyMSBuildScripts">
27-
<Exec Command="dotnet test &quot;$(MSBuildThisFileDirectory)test\coverlet.core.tests\coverlet.core.tests.csproj&quot; -c $(Configuration) /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:Include=[coverlet.*]* -verbosity:minimal"/>
27+
<Exec Command="dotnet test &quot;$(MSBuildThisFileDirectory)test\coverlet.core.tests\coverlet.core.tests.csproj&quot; -c $(Configuration) /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:Include=[coverlet.*]*"/>
2828
</Target>
2929

3030
<Target Name="CreateNuGetPackage" AfterTargets="RunTests" Condition="$(Configuration) == 'Release'">

src/coverlet.core/Coverage.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,11 @@ private void CalculateCoverage()
209209
{
210210
if (!File.Exists(result.HitsFilePath))
211211
{
212-
_logger.LogWarning($"Hits file:'{result.HitsFilePath}' not found for module: '{result.Module}'");
212+
// Hits file could be missed mainly for two reason
213+
// 1) Issue during module Unload()
214+
// 2) Instrumented module is never loaded or used so we don't have any hit to register and
215+
// module tracker is never used
216+
_logger.LogVerbose($"Hits file:'{result.HitsFilePath}' not found for module: '{result.Module}'");
213217
continue;
214218
}
215219

0 commit comments

Comments
 (0)