Skip to content

Commit

Permalink
merge PR #7 Handle optional complexity attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
irongut committed Sep 22, 2021
2 parents 20025e7 + 9cce3f5 commit dcef09e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/CodeCoverageSummary/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ private static CodeSummary ParseTestResults(string filename)
Name = item.Attribute("name").Value,
LineRate = double.Parse(item.Attribute("line-rate").Value),
BranchRate = double.Parse(item.Attribute("branch-rate").Value),
Complexity = int.Parse(item.Attribute("complexity").Value)
Complexity = int.Parse(item.Attribute("complexity")?.Value ?? "0")
};
summary.Packages.Add(packageCoverage);
summary.Complexity += packageCoverage.Complexity;
Expand Down

0 comments on commit dcef09e

Please sign in to comment.