private static StringBuilder AddCommentsForStatus(this StringBuilder report, BulkSolutionsAnalysisRunStatistics statistics, string status) { if (statistics.CommentsWithCount.Count == 0) { return(report); } var maxCommentLength = statistics.CommentsWithCount.Keys.Max(comment => comment.Length); report .AppendLine() .AddCommentsForStatusHeader(status) .AppendLine($"| {"Comment".PadRight(maxCommentLength, ' ')} | {"Count".PadRight(CommentsCountColumnWidth, ' ')} |") .AppendLine($"| {"".PadRight(maxCommentLength, '-')}:| {"".PadRight(CommentsCountColumnWidth, '-')}:|"); foreach (var commentWithCount in statistics.CommentsWithCount) { report.AddCommentCount(commentWithCount, maxCommentLength); } return(report); }