diff options
Diffstat (limited to 'sonar-scanner-engine')
3 files changed, 5 insertions, 0 deletions
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/externalissue/ExternalIssueImporter.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/externalissue/ExternalIssueImporter.java index f484f0bd195..b68fa4c910f 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/externalissue/ExternalIssueImporter.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/externalissue/ExternalIssueImporter.java @@ -58,6 +58,7 @@ public class ExternalIssueImporter { NewExternalIssue externalIssue = context.newExternalIssue() .forRule(RuleKey.of(issue.engineId, issue.ruleId)) .severity(Severity.valueOf(issue.severity)) + .remediationEffortMinutes(20L) .type(RuleType.valueOf(issue.type)); NewIssueLocation primary = fillLocation(context, externalIssue.newLocation(), issue.primaryLocation); diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/externalissue/ReportParser.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/externalissue/ReportParser.java index 61c35a05eb8..80728310026 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/externalissue/ReportParser.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/externalissue/ReportParser.java @@ -108,6 +108,8 @@ public class ReportParser { String ruleId; String severity; String type; + @Nullable + Integer effortMinutes; Location primaryLocation; @Nullable Location[] secondaryLocations; 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 6309720339d..eba43f72564 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 @@ -33,6 +33,7 @@ import org.sonar.api.batch.sensor.issue.internal.DefaultIssue; import org.sonar.api.batch.sensor.issue.internal.DefaultIssueLocation; import org.sonar.api.rule.RuleKey; import org.sonar.api.rule.Severity; +import org.sonar.api.rules.RuleType; import org.sonar.api.utils.MessageException; import org.sonar.scanner.protocol.output.ScannerReport; import org.sonar.scanner.report.ReportPublisher; @@ -154,6 +155,7 @@ public class ModuleIssuesTest { DefaultExternalIssue issue = new DefaultExternalIssue() .at(new DefaultIssueLocation().on(file).at(file.selectLine(3)).message("Foo")) + .type(RuleType.BUG) .forRule(SQUID_RULE_KEY) .severity(org.sonar.api.batch.rule.Severity.CRITICAL); |