tweaked per Luke's suggestions, thanks!
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@1358 51baf565-9d33-0410-a72c-fc3788e3496d
This commit is contained in:
@ -12,19 +12,16 @@ import java.util.Iterator;
|
||||
|
||||
public class HTMLRenderer implements Renderer {
|
||||
|
||||
/**
|
||||
* The end of line string for this machine.
|
||||
*/
|
||||
protected String EOL = System.getProperty("line.separator", "\n");
|
||||
|
||||
public String render(Report report) {
|
||||
StringBuffer buf = new StringBuffer("<html><head><title>PMD</title></head><body>" + EOL+ "<table align=\"center\"><tr>" + EOL+ "<th>File</th><th>Line</th><th>Problem</th></tr>" + EOL);
|
||||
StringBuffer buf = new StringBuffer("<html><head><title>PMD</title></head><body>" + EOL+ "<table align=\"center\" cellspacing=\"0\" cellpadding=\"3\"><tr>" + EOL+ "<th>File</th><th>Line</th><th>Problem</th></tr>" + EOL);
|
||||
boolean colorize = true;
|
||||
for (Iterator i = report.iterator(); i.hasNext();) {
|
||||
RuleViolation rv = (RuleViolation) i.next();
|
||||
buf.append("<tr ");
|
||||
if (colorize) {
|
||||
buf.append("bgcolor=\"#00FFFF\"");
|
||||
buf.append("bgcolor=\"lightgrey\"");
|
||||
colorize = false;
|
||||
} else {
|
||||
colorize = true;
|
||||
|
Reference in New Issue
Block a user