1
2
3
4
5 package net.sourceforge.pmd.renderers;
6
7 import net.sourceforge.pmd.*;
8
9
10
11
12 public class CodeClimateIssue {
13 public final String type = "issue";
14 public String check_name;
15 public String description;
16 public Content content;
17 public final String[] categories = { "Style" };
18 public Location location;
19 public String severity;
20
21
22
23
24 public static class Location {
25 public String path;
26 public Lines lines;
27
28 private class Lines {
29 public int begin;
30 public int end;
31 }
32
33 public Location(String path, int beginLine, int endLine) {
34 this.path = path;
35 this.lines = new Lines();
36 lines.begin = beginLine;
37 lines.end = endLine;
38 }
39 }
40
41
42
43
44 public static class Content {
45 public String body;
46
47
48
49
50
51 public Content(String body) {
52 this.body = body.replace(PMD.EOL, " ");
53 }
54 }
55 }