Skip to content

Commit

Permalink
Merge pull request #17 from jeankedotcom/summary-error
Browse files Browse the repository at this point in the history
Check for totalLines to be 0 in CoverageSummary.
  • Loading branch information
tonerdo committed Mar 26, 2018
2 parents a37aa5a + f484e52 commit afd49c9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/coverlet.core/CoverageSummary.cs
Expand Up @@ -32,7 +32,7 @@ public CoverageSummaryResult CalculateSummary()
}
}

result.Add(System.IO.Path.GetFileNameWithoutExtension(mod.Key), (linesCovered * 100) / totalLines);
result.Add(System.IO.Path.GetFileNameWithoutExtension(mod.Key), totalLines == 0 ? totalLines : (linesCovered * 100) / totalLines);
}

return result;
Expand Down

0 comments on commit afd49c9

Please sign in to comment.