diff options
author | Simon Brandhof <simon.brandhof@gmail.com> | 2013-05-14 23:32:51 +0200 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@gmail.com> | 2013-05-14 23:32:51 +0200 |
commit | ba5b34d232c813a45b0c07e0552cd866ee1e4987 (patch) | |
tree | c68171f7985822128abd0c8e8a02d59a46c5ca1e /sonar-batch | |
parent | 32e911370bfa8a7f797e5ac8d2cd2d6c1ef9e457 (diff) | |
download | sonarqube-ba5b34d232c813a45b0c07e0552cd866ee1e4987.tar.gz sonarqube-ba5b34d232c813a45b0c07e0552cd866ee1e4987.zip |
SONAR-3755 rename ISSUES.DESCRIPTION to MESSAGE
Diffstat (limited to 'sonar-batch')
3 files changed, 11 insertions, 5 deletions
diff --git a/sonar-batch/src/main/java/org/sonar/batch/issue/DeprecatedViolations.java b/sonar-batch/src/main/java/org/sonar/batch/issue/DeprecatedViolations.java index d0db555891a..adb81f8967b 100644 --- a/sonar-batch/src/main/java/org/sonar/batch/issue/DeprecatedViolations.java +++ b/sonar-batch/src/main/java/org/sonar/batch/issue/DeprecatedViolations.java @@ -54,7 +54,7 @@ public class DeprecatedViolations implements BatchComponent { .ruleKey(RuleKey.of(violation.getRule().getRepositoryKey(), violation.getRule().getKey())) .effortToFix(violation.getCost()) .line(violation.getLineId()) - .description(violation.getMessage()) + .message(violation.getMessage()) .severity(violation.getSeverity() != null ? violation.getSeverity().name() : Severity.MAJOR) .build(); } diff --git a/sonar-batch/src/main/java/org/sonar/batch/report/SonarReport.java b/sonar-batch/src/main/java/org/sonar/batch/report/SonarReport.java index dc706c58036..f02a8c466be 100644 --- a/sonar-batch/src/main/java/org/sonar/batch/report/SonarReport.java +++ b/sonar-batch/src/main/java/org/sonar/batch/report/SonarReport.java @@ -110,13 +110,15 @@ public class SonarReport implements BatchComponent { put(jsonIssue, "key", issue.key()); put(jsonIssue, "component", issue.componentKey()); put(jsonIssue, "line", issue.line()); - put(jsonIssue, "description", issue.description()); + put(jsonIssue, "message", issue.message()); put(jsonIssue, "severity", issue.severity()); put(jsonIssue, "rule", issue.ruleKey()); put(jsonIssue, "status", issue.status()); put(jsonIssue, "resolution", issue.resolution()); put(jsonIssue, "isNew", issue.isNew()); + put(jsonIssue, "reporter", issue.reporter()); put(jsonIssue, "assignee", issue.assignee()); + put(jsonIssue, "effortToFix", issue.effortToFix()); put(jsonIssue, "creationDate", issue.creationDate()); put(jsonIssue, "updateDate", issue.updateDate()); put(jsonIssue, "closeDate", issue.closeDate()); diff --git a/sonar-batch/src/test/java/org/sonar/batch/report/SonarReportTest.java b/sonar-batch/src/test/java/org/sonar/batch/report/SonarReportTest.java index 97f2ea77449..55253b35fb6 100644 --- a/sonar-batch/src/test/java/org/sonar/batch/report/SonarReportTest.java +++ b/sonar-batch/src/test/java/org/sonar/batch/report/SonarReportTest.java @@ -126,11 +126,13 @@ public class SonarReportTest { DefaultIssue issue = new DefaultIssue() .setKey("200") .setComponentKey("Action.java") - .setDescription("SystemPrintln") + .setMessage("SystemPrintln") .setSeverity("MINOR") .setStatus(Issue.STATUS_CLOSED) .setResolution(Issue.RESOLUTION_FALSE_POSITIVE) .setLine(1) + .setEffortToFix(3.14) + .setReporter("julien") .setAssignee("simon") .setRuleKey(RuleKey.of("squid", "AvoidCycle")) .setCreationDate(DateUtils.parseDate("2013-04-24")) @@ -145,17 +147,19 @@ public class SonarReportTest { JSONArray issues = (JSONArray) json.get("issues"); assertThat(issues).hasSize(1); JSONObject jsonIssue = (JSONObject) issues.get(0); - assertThat(jsonIssue.values()).hasSize(13); + assertThat(jsonIssue.values()).hasSize(15); assertThat(jsonIssue.get("key")).isEqualTo("200"); assertThat(jsonIssue.get("component")).isEqualTo("Action.java"); assertThat(jsonIssue.get("line")).isEqualTo(1); - assertThat(jsonIssue.get("description")).isEqualTo("SystemPrintln"); + assertThat(jsonIssue.get("message")).isEqualTo("SystemPrintln"); assertThat(jsonIssue.get("severity")).isEqualTo("MINOR"); assertThat(jsonIssue.get("rule")).isEqualTo("squid:AvoidCycle"); assertThat(jsonIssue.get("status")).isEqualTo("CLOSED"); assertThat(jsonIssue.get("resolution")).isEqualTo("FALSE-POSITIVE"); assertThat(jsonIssue.get("assignee")).isEqualTo("simon"); + assertThat(jsonIssue.get("effortToFix")).isEqualTo(3.14); + assertThat(jsonIssue.get("reporter")).isEqualTo("julien"); assertThat(jsonIssue.get("isNew")).isEqualTo(false); assertThat((String) jsonIssue.get("creationDate")).contains("2013-04-24T00:00"); assertThat((String) jsonIssue.get("updateDate")).contains("2013-04-25T00:00"); |