Skip to content

Commit

Permalink
JBIDE-19380 add summary count of issues (so when there are no problem…
Browse files Browse the repository at this point in the history
…s a blank page looks intentionally blank)
  • Loading branch information
nickboldt committed Jul 20, 2015
1 parent 364a727 commit 294e870
Showing 1 changed file with 4 additions and 0 deletions.
Expand Up @@ -21,6 +21,7 @@ public class ProductReport extends Report {

Logger log = Logger.getLogger(ProductReport.class);
Installation installation;
int overallIssueCount;

public ProductReport(Installation installation) {
this.installation = installation;
Expand All @@ -43,6 +44,8 @@ protected void generateBody() {
reportVersionDecreasedIssue();
reportFolderAndJarIssue();
reportMD5Issues();
add("&nbsp;<p>" + (overallIssueCount < 1 ? "<b style='color:green'>No" : "<b style='color:red'>" + overallIssueCount)
+ " issues found.</b></p>\n");
}

protected void generateFooter() {
Expand All @@ -55,6 +58,7 @@ private String reportIssues(Class<? extends Issue> class1) {
int count = r1.getCount() + r2.getCount();
String text = r1.getHtml() + r2.getHtml();
IssueCounter.getInstance().setValue(class1,count);
overallIssueCount += count;
return count != 0 ? text : null; // "No issues found" + html.newLine() : text;
}

Expand Down

0 comments on commit 294e870

Please sign in to comment.