Skip to content

Commit 7baf906

Browse files
Fix relative path in JsonReport
1 parent 74d8748 commit 7baf906

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/main/java/org/sonarlint/cli/report/JsonReport.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,9 @@ public void execute(String projectName, Date date, Collection<Trackable> trackab
6262

6363
JsonObject location = new JsonObject();
6464
json.add("location", location);
65-
location.addProperty("path", issue.getInputFile().getPath().replaceFirst("^/code-rw/", ""));
65+
66+
// Code Climate CLI expects relative path to file
67+
location.addProperty("path", issue.getInputFile().getPath().replaceFirst("^/code-read-write/", ""));
6668

6769
JsonObject lines = new JsonObject();
6870
location.add("lines", lines);

0 commit comments

Comments
 (0)