Skip to content

Commit

Permalink
improved generated package names when names missing
Browse files Browse the repository at this point in the history
  • Loading branch information
irongut committed Feb 19, 2022
1 parent 1699cd4 commit 7b1923c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/CodeCoverageSummary/Program.cs
Expand Up @@ -217,7 +217,7 @@ private static CodeSummary ParseTestResults(string filename, CodeSummary summary
{
CodeCoverage packageCoverage = new()
{
Name = string.IsNullOrWhiteSpace(item.Attribute("name")?.Value) ? $"Package {i}" : item.Attribute("name").Value,
Name = string.IsNullOrWhiteSpace(item.Attribute("name")?.Value) ? $"{Path.GetFileNameWithoutExtension(filename)} Package {i}" : item.Attribute("name").Value,
LineRate = double.Parse(item.Attribute("line-rate")?.Value ?? "0"),
BranchRate = double.Parse(item.Attribute("branch-rate")?.Value ?? "0"),
Complexity = double.Parse(item.Attribute("complexity")?.Value ?? "0")
Expand Down

0 comments on commit 7b1923c

Please sign in to comment.