1 |
| |
2 |
| |
3 |
| |
4 |
| package net.sourceforge.pmd.renderers; |
5 |
| |
6 |
| import net.sourceforge.pmd.Report; |
7 |
| import net.sourceforge.pmd.IRuleViolation; |
8 |
| |
9 |
| import java.util.Iterator; |
10 |
| |
11 |
| public class EmacsRenderer extends AbstractRenderer implements Renderer { |
12 |
| |
13 |
| protected String EOL = System.getProperty("line.separator", "\n"); |
14 |
| |
15 |
0
| public String render(Report report) {
|
16 |
0
| StringBuffer buf = new StringBuffer();
|
17 |
0
| for (Iterator i = report.iterator(); i.hasNext();) {
|
18 |
0
| IRuleViolation rv = (IRuleViolation) i.next();
|
19 |
0
| buf.append(EOL).append(rv.getFilename());
|
20 |
0
| buf.append(":").append(Integer.toString(rv.getBeginLine()));
|
21 |
0
| buf.append(": ").append(rv.getDescription());
|
22 |
| } |
23 |
0
| return buf.toString();
|
24 |
| } |
25 |
| } |