aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-ws-client/src/main/java/org/sonar/wsclient/issue/NewIssue.java
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@gmail.com>2013-05-16 23:05:25 +0200
committerSimon Brandhof <simon.brandhof@gmail.com>2013-05-16 23:05:25 +0200
commit6c263271502929862a6fde7846408c4576640614 (patch)
tree8a43fafc37659e513047b0eedfc7f63f3eab41f3 /sonar-ws-client/src/main/java/org/sonar/wsclient/issue/NewIssue.java
parentfc063e7aa96c11db5cbc68b6794532193b13d4d7 (diff)
downloadsonarqube-6c263271502929862a6fde7846408c4576640614.tar.gz
sonarqube-6c263271502929862a6fde7846408c4576640614.zip
SONAR-4304 better form of manual issue
Diffstat (limited to 'sonar-ws-client/src/main/java/org/sonar/wsclient/issue/NewIssue.java')
-rw-r--r--sonar-ws-client/src/main/java/org/sonar/wsclient/issue/NewIssue.java25
1 files changed, 13 insertions, 12 deletions
diff --git a/sonar-ws-client/src/main/java/org/sonar/wsclient/issue/NewIssue.java b/sonar-ws-client/src/main/java/org/sonar/wsclient/issue/NewIssue.java
index f4b43a39385..4b8932c2a11 100644
--- a/sonar-ws-client/src/main/java/org/sonar/wsclient/issue/NewIssue.java
+++ b/sonar-ws-client/src/main/java/org/sonar/wsclient/issue/NewIssue.java
@@ -19,6 +19,7 @@
*/
package org.sonar.wsclient.issue;
+import javax.annotation.Nullable;
import java.util.HashMap;
import java.util.Map;
@@ -40,7 +41,10 @@ public class NewIssue {
return params;
}
- public NewIssue severity(String s) {
+ /**
+ * Optionally set the severity, in INFO, MINOR, MAJOR, CRITICAL or BLOCKER. Default value is MAJOR.
+ */
+ public NewIssue severity(@Nullable String s) {
params.put("severity", s);
return this;
}
@@ -50,31 +54,28 @@ public class NewIssue {
return this;
}
+ /**
+ * Rule key prefixed by the repository, for example "checkstyle:AvoidCycle".
+ */
public NewIssue rule(String s) {
params.put("rule", s);
return this;
}
/**
- * Optional line
+ * Optional line, starting from 1.
*/
- public NewIssue line(int i) {
+ public NewIssue line(@Nullable Integer i) {
params.put("line", i);
return this;
}
- public NewIssue description(String s) {
- params.put("desc", s);
- return this;
- }
-
- // TODO to be removed
- public NewIssue cost(Double d) {
- params.put("cost", d);
+ public NewIssue message(@Nullable String s) {
+ params.put("message", s);
return this;
}
- public NewIssue effortToFix(double d) {
+ public NewIssue effortToFix(@Nullable Double d) {
params.put("effortToFix", d);
return this;
}