| {Encode("Comment Health")} | "; - sb.AppendLine($"|||||
|---|---|---|---|---|---|
| {Encode("File")} | {Encode("Language")} | {Encode("Code")} | {Encode("Comment")} | {Encode("Blank")} | {Encode("Total")} | {healthTh}{Encode("Complexity")} | "; + sb.AppendLine($"
| {Encode("File")} | {Encode("Language")} | {Encode("Code")} | {Encode("Comment")} | {Encode("Blank")} | {Encode("Total")} | {healthTh}{complexityTh}{NumCell(summary.Comment, summary.Total, noHealth)} | "); sb.Append($"{NumCell(summary.Blank, summary.Total, noHealth)} | "); sb.Append($"{summary.Total:N0} | "); - if (noHealth) + if (!noHealth) { - sb.AppendLine(""); + sb.Append(""); } - else + if (!noComplexity) { - sb.AppendLine(" | "); + sb.Append($" | {ComplexityCell(summary.ComplexityTotal)} | "); } + sb.AppendLine(""); sb.AppendLine("
| {Encode("Comment Health")} | "; - sb.AppendLine($"|||||
|---|---|---|---|---|---|
| {Encode("Language")} | {Encode("Files")} | {Encode("Code")} | {Encode("Comment")} | {Encode("Blank")} | {Encode("Total")} | {healthTh}{Encode("Complexity")} | "; + sb.AppendLine($"
| {Encode("Language")} | {Encode("Files")} | {Encode("Code")} | {Encode("Comment")} | {Encode("Blank")} | {Encode("Total")} | {healthTh}{complexityTh}{HealthCell(lang.Health)} | "); } + if (!noComplexity) + { + sb.Append($"{ComplexityCell(lang.ComplexityTotal)} | "); + } sb.AppendLine(""); } @@ -350,14 +357,15 @@ private static void BuildLanguageSection(StringBuilder sb, AnalysisSummary summa sb.Append($"{NumCell(summary.Comment, summary.Total, noHealth)} | "); sb.Append($"{NumCell(summary.Blank, summary.Total, noHealth)} | "); sb.Append($"{summary.Total:N0} | "); - if (noHealth) + if (!noHealth) { - sb.AppendLine(""); + sb.Append(""); } - else + if (!noComplexity) { - sb.AppendLine(" | "); + sb.Append($" | {ComplexityCell(summary.ComplexityTotal)} | "); } + sb.AppendLine(""); sb.AppendLine("