Skip to content

Commit 246b6e2

Browse files
committed
removing duplicated tag; initializing summaryComplexity once
1 parent 4bb37aa commit 246b6e2

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/ReportGenerator.Core/Reporting/Builders/CoberturaReportBuilder.cs

+4-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,6 @@ public void CreateClassReport(Class @class, IEnumerable<FileAnalysis> fileAnalys
9494

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

9998
var methodMetrics = file.MethodMetrics.FirstOrDefault(q => q.ShortName == codeElement.Name);
10099
if (methodMetrics != null)
@@ -171,6 +170,10 @@ public void CreateSummaryReport(SummaryResult summaryResult)
171170
if (!assemblyComplexity.HasValue)
172171
{
173172
assemblyComplexity = 0;
173+
}
174+
175+
if (!summaryComplexity.HasValue)
176+
{
174177
summaryComplexity = 0;
175178
}
176179

0 commit comments

Comments
 (0)