aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-scanner-engine
diff options
context:
space:
mode:
authorDuarte Meneses <duarte.meneses@sonarsource.com>2018-04-13 15:59:23 +0200
committerSonarTech <sonartech@sonarsource.com>2018-04-26 20:20:51 +0200
commit6c5aad9a2d48cd783993a3a31911e307bf6827f5 (patch)
treee12910dde39fb187663a7f9bf6c93d73bb45efef /sonar-scanner-engine
parent4cbf46ae604e6619c5b1fdaab81f5dd28f464a0e (diff)
downloadsonarqube-6c5aad9a2d48cd783993a3a31911e307bf6827f5.tar.gz
sonarqube-6c5aad9a2d48cd783993a3a31911e307bf6827f5.zip
SONAR-10543 Update test to v7.2 and remove descriptionUrl and ruleTitle from scanner
Diffstat (limited to 'sonar-scanner-engine')
-rw-r--r--sonar-scanner-engine/src/main/java/org/sonar/scanner/issue/ModuleIssues.java3
-rw-r--r--sonar-scanner-engine/src/main/java/org/sonar/scanner/sensor/noop/NoOpNewExternalIssue.java12
-rw-r--r--sonar-scanner-engine/src/test/java/org/sonar/scanner/issue/ModuleIssuesTest.java3
3 files changed, 2 insertions, 16 deletions
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/issue/ModuleIssues.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/issue/ModuleIssues.java
index 1ff50f8e5b5..f8d72f526e7 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/issue/ModuleIssues.java
+++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/issue/ModuleIssues.java
@@ -111,7 +111,7 @@ public class ModuleIssues {
}
private static ScannerReport.ExternalIssue createReportExternalIssue(ExternalIssue issue, int componentRef) {
- String primaryMessage = Strings.isNullOrEmpty(issue.primaryLocation().message()) ? issue.ruleTitle() : issue.primaryLocation().message();
+ String primaryMessage = Strings.isNullOrEmpty(issue.primaryLocation().message()) ? issue.ruleKey().toString() : issue.primaryLocation().message();
Severity severity = Severity.valueOf(issue.severity().name());
ScannerReport.ExternalIssue.Builder builder = ScannerReport.ExternalIssue.newBuilder();
@@ -121,7 +121,6 @@ public class ModuleIssues {
builder.setSeverity(severity);
builder.setRuleRepository(issue.ruleKey().repository());
builder.setRuleKey(issue.ruleKey().rule());
- builder.setRuleTitle(issue.ruleTitle());
builder.setMsg(primaryMessage);
locationBuilder.setMsg(primaryMessage);
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/sensor/noop/NoOpNewExternalIssue.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/sensor/noop/NoOpNewExternalIssue.java
index 42d4a902a74..16066a4f617 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/sensor/noop/NoOpNewExternalIssue.java
+++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/sensor/noop/NoOpNewExternalIssue.java
@@ -65,12 +65,6 @@ public class NoOpNewExternalIssue implements NewExternalIssue {
}
@Override
- public NewExternalIssue descriptionUrl(String url) {
- // no op
- return this;
- }
-
- @Override
public NewExternalIssue addFlow(Iterable<NewIssueLocation> flowLocations) {
// no op
return this;
@@ -83,12 +77,6 @@ public class NoOpNewExternalIssue implements NewExternalIssue {
}
@Override
- public NewExternalIssue ruleTitle(String title) {
- // no op
- return this;
- }
-
- @Override
public void save() {
// no op
}
diff --git a/sonar-scanner-engine/src/test/java/org/sonar/scanner/issue/ModuleIssuesTest.java b/sonar-scanner-engine/src/test/java/org/sonar/scanner/issue/ModuleIssuesTest.java
index 844f6edcfab..6309720339d 100644
--- a/sonar-scanner-engine/src/test/java/org/sonar/scanner/issue/ModuleIssuesTest.java
+++ b/sonar-scanner-engine/src/test/java/org/sonar/scanner/issue/ModuleIssuesTest.java
@@ -155,8 +155,7 @@ public class ModuleIssuesTest {
DefaultExternalIssue issue = new DefaultExternalIssue()
.at(new DefaultIssueLocation().on(file).at(file.selectLine(3)).message("Foo"))
.forRule(SQUID_RULE_KEY)
- .severity(org.sonar.api.batch.rule.Severity.CRITICAL)
- .ruleTitle("title");
+ .severity(org.sonar.api.batch.rule.Severity.CRITICAL);
moduleIssues.initAndAddExternalIssue(issue);