diff options
author | Duarte Meneses <duarte.meneses@sonarsource.com> | 2015-07-30 10:24:11 +0200 |
---|---|---|
committer | Duarte Meneses <duarte.meneses@sonarsource.com> | 2015-07-30 15:40:57 +0200 |
commit | 6ae87caef4147e53cb58866c99ce978edd4d3b9c (patch) | |
tree | 64547a7eb804472e9fa030aec02c157b1471e98b /sonar-runner-batch-interface/src/main/java/org/sonar | |
parent | 5ca7bdca3fcb34463b360e5a6a98237e78655af4 (diff) | |
download | sonar-scanner-cli-6ae87caef4147e53cb58866c99ce978edd4d3b9c.tar.gz sonar-scanner-cli-6ae87caef4147e53cb58866c99ce978edd4d3b9c.zip |
SONARUNNER-143 New API to retrieve issues produced by the analysis
Diffstat (limited to 'sonar-runner-batch-interface/src/main/java/org/sonar')
-rw-r--r-- | sonar-runner-batch-interface/src/main/java/org/sonar/runner/batch/IsolatedLauncher.java | 5 | ||||
-rw-r--r-- | sonar-runner-batch-interface/src/main/java/org/sonar/runner/batch/IssueListener.java | 111 |
2 files changed, 115 insertions, 1 deletions
diff --git a/sonar-runner-batch-interface/src/main/java/org/sonar/runner/batch/IsolatedLauncher.java b/sonar-runner-batch-interface/src/main/java/org/sonar/runner/batch/IsolatedLauncher.java index 834c11b..cb09445 100644 --- a/sonar-runner-batch-interface/src/main/java/org/sonar/runner/batch/IsolatedLauncher.java +++ b/sonar-runner-batch-interface/src/main/java/org/sonar/runner/batch/IsolatedLauncher.java @@ -28,8 +28,11 @@ public interface IsolatedLauncher { void stop(); void execute(Properties properties); - + + void execute(Properties properties, IssueListener listener); + void executeOldVersion(Properties properties); String getVersion(); + } diff --git a/sonar-runner-batch-interface/src/main/java/org/sonar/runner/batch/IssueListener.java b/sonar-runner-batch-interface/src/main/java/org/sonar/runner/batch/IssueListener.java new file mode 100644 index 0000000..72a94e4 --- /dev/null +++ b/sonar-runner-batch-interface/src/main/java/org/sonar/runner/batch/IssueListener.java @@ -0,0 +1,111 @@ +/* + * SonarQube Runner - Batch Interface + * Copyright (C) 2011 SonarSource + * sonarqube@googlegroups.com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 + */ +package org.sonar.runner.batch; + +import java.util.Date; + +public interface IssueListener { + void handle(Issue issue); + + class Issue { + private String key; + private String componentKey; + private Integer line; + private String message; + private String rule; + private String status; + private String resolution; + private boolean isNew; + private String assignee; + + public void setKey(String key) { + this.key = key; + } + + public void setComponentKey(String componentKey) { + this.componentKey = componentKey; + } + + public void setLine(Integer line) { + this.line = line; + } + + public void setMessage(String message) { + this.message = message; + } + + public void setRule(String rule) { + this.rule = rule; + } + + public void setStatus(String status) { + this.status = status; + } + + public void setResolution(String resolution) { + this.resolution = resolution; + } + + public void setNew(boolean isNew) { + this.isNew = isNew; + } + + public void setAssignee(String assignee) { + this.assignee = assignee; + } + + public String getKey() { + return key; + } + + public String getComponentKey() { + return componentKey; + } + + public Integer getLine() { + return line; + } + + public String getMessage() { + return message; + } + + public String getRule() { + return rule; + } + + public String getStatus() { + return status; + } + + public String getResolution() { + return resolution; + } + + public boolean isNew() { + return isNew; + } + + public String getAssignee() { + return assignee; + } + + } +} |