Skip to content

Commit

Permalink
removing duplicated tag; initializing summaryComplexity once
Browse files Browse the repository at this point in the history
  • Loading branch information
eddynaka committed Aug 2, 2020
1 parent 4bb37aa commit 246b6e2
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ public void CreateClassReport(Class @class, IEnumerable<FileAnalysis> fileAnalys

methodElement.Add(new XAttribute("line-rate", methodLineRate.ToString(CultureInfo.InvariantCulture)));
methodElement.Add(new XAttribute("branch-rate", methodBranchRate.ToString(CultureInfo.InvariantCulture)));
methodElement.Add(new XAttribute("complexity", "NaN"));

var methodMetrics = file.MethodMetrics.FirstOrDefault(q => q.ShortName == codeElement.Name);
if (methodMetrics != null)
Expand Down Expand Up @@ -171,6 +170,10 @@ public void CreateSummaryReport(SummaryResult summaryResult)
if (!assemblyComplexity.HasValue)
{
assemblyComplexity = 0;
}

if (!summaryComplexity.HasValue)
{
summaryComplexity = 0;
}

Expand Down

0 comments on commit 246b6e2

Please sign in to comment.