diff options
author | Julien HENRY <julien.henry@sonarsource.com> | 2015-03-26 14:09:31 +0100 |
---|---|---|
committer | Teryk Bellahsene <teryk.bellahsene@sonarsource.com> | 2015-03-26 17:32:20 +0100 |
commit | 6f5449b6daa0f588c2e18bf5e04e1dbe5b2688b1 (patch) | |
tree | fc9986467f08ae2afad9f8825b1de80fd0a0c2af /sonar-batch-protocol | |
parent | a83dfe19c1da637994148d538e116d4edf22ed98 (diff) | |
download | sonarqube-6f5449b6daa0f588c2e18bf5e04e1dbe5b2688b1.tar.gz sonarqube-6f5449b6daa0f588c2e18bf5e04e1dbe5b2688b1.zip |
SONAR-6317 Feed SCM in compute report - batch side
Diffstat (limited to 'sonar-batch-protocol')
3 files changed, 3 insertions, 33 deletions
diff --git a/sonar-batch-protocol/src/main/java/org/sonar/batch/protocol/input/FileData.java b/sonar-batch-protocol/src/main/java/org/sonar/batch/protocol/input/FileData.java index d68bcbd3c61..28b8083c0e2 100644 --- a/sonar-batch-protocol/src/main/java/org/sonar/batch/protocol/input/FileData.java +++ b/sonar-batch-protocol/src/main/java/org/sonar/batch/protocol/input/FileData.java @@ -26,16 +26,10 @@ public class FileData { private final String hash; private final boolean needBlame; - private final String scmLastCommitDatetimesByLine; - private final String scmRevisionsByLine; - private final String scmAuthorsByLine; - public FileData(@Nullable String hash, boolean needBlame, @Nullable String scmLastCommitDatetimesByLine, @Nullable String scmRevisionsByLine, @Nullable String scmAuthorsByLine) { + public FileData(@Nullable String hash, boolean needBlame) { this.hash = hash; this.needBlame = needBlame; - this.scmLastCommitDatetimesByLine = scmLastCommitDatetimesByLine; - this.scmRevisionsByLine = scmRevisionsByLine; - this.scmAuthorsByLine = scmAuthorsByLine; } @CheckForNull @@ -47,19 +41,4 @@ public class FileData { return needBlame; } - @CheckForNull - public String scmLastCommitDatetimesByLine() { - return scmLastCommitDatetimesByLine; - } - - @CheckForNull - public String scmRevisionsByLine() { - return scmRevisionsByLine; - } - - @CheckForNull - public String scmAuthorsByLine() { - return scmAuthorsByLine; - } - } diff --git a/sonar-batch-protocol/src/test/java/org/sonar/batch/protocol/input/ProjectRepositoriesTest.java b/sonar-batch-protocol/src/test/java/org/sonar/batch/protocol/input/ProjectRepositoriesTest.java index b86b2938f15..91a1b171df6 100644 --- a/sonar-batch-protocol/src/test/java/org/sonar/batch/protocol/input/ProjectRepositoriesTest.java +++ b/sonar-batch-protocol/src/test/java/org/sonar/batch/protocol/input/ProjectRepositoriesTest.java @@ -50,8 +50,8 @@ public class ProjectRepositoriesTest { ref.addActiveRule(activeRule); ref.setLastAnalysisDate(DATE_FORMAT.parse("2014-05-18T15:50:45+0100")); ref.setTimestamp(10); - ref.addFileData("foo", "src/main/java/Foo.java", new FileData("xyz", true, "1=12345,2=3456", "1=345,2=345", "1=henryju,2=gaudin")); - ref.addFileData("foo", "src/main/java/Foo2.java", new FileData("xyz", false, "1=12345,2=3456", "1=345,2=345", "1=henryju,2=gaudin")); + ref.addFileData("foo", "src/main/java/Foo.java", new FileData("xyz", true)); + ref.addFileData("foo", "src/main/java/Foo2.java", new FileData("xyz", false)); JsonAssert.assertJson(ref.toJson()) .isSimilarTo(getClass().getResource("ProjectRepositoriesTest/testToJson.json")); @@ -89,9 +89,6 @@ public class ProjectRepositoriesTest { assertThat(ref.fileData("foo", "src/main/java/Foo.java").hash()).isEqualTo("xyz"); assertThat(ref.fileData("foo", "src/main/java/Foo.java").needBlame()).isTrue(); - assertThat(ref.fileData("foo", "src/main/java/Foo.java").scmAuthorsByLine()).isEqualTo("1=henryju,2=gaudin"); - assertThat(ref.fileData("foo", "src/main/java/Foo.java").scmLastCommitDatetimesByLine()).isEqualTo("1=12345,2=3456"); - assertThat(ref.fileData("foo", "src/main/java/Foo.java").scmRevisionsByLine()).isEqualTo("1=345,2=345"); assertThat(ref.lastAnalysisDate().getTime()).isEqualTo(DATE_FORMAT.parse("2014-10-31T00:00:00+0100").getTime()); } diff --git a/sonar-batch-protocol/src/test/resources/org/sonar/batch/protocol/input/ProjectRepositoriesTest/testToJson.json b/sonar-batch-protocol/src/test/resources/org/sonar/batch/protocol/input/ProjectRepositoriesTest/testToJson.json index 7b5e29c3695..d728bdc4414 100644 --- a/sonar-batch-protocol/src/test/resources/org/sonar/batch/protocol/input/ProjectRepositoriesTest/testToJson.json +++ b/sonar-batch-protocol/src/test/resources/org/sonar/batch/protocol/input/ProjectRepositoriesTest/testToJson.json @@ -32,16 +32,10 @@ "src/main/java/Foo.java": { "hash": "xyz", "needBlame": true, - "scmLastCommitDatetimesByLine": "1\u003d12345,2\u003d3456", - "scmRevisionsByLine": "1\u003d345,2\u003d345", - "scmAuthorsByLine": "1\u003dhenryju,2\u003dgaudin" }, "src/main/java/Foo2.java": { "hash": "xyz", "needBlame": false, - "scmLastCommitDatetimesByLine": "1\u003d12345,2\u003d3456", - "scmRevisionsByLine": "1\u003d345,2\u003d345", - "scmAuthorsByLine": "1\u003dhenryju,2\u003dgaudin" } } }, |