}
issuable.addIssue(toDefaultIssue(project.getKey(), ComponentKeys.createEffectiveKey(project, r), issue));
}
public static DefaultIssue toDefaultIssue(String projectKey, String componentKey, Issue issue) {
Severity overridenSeverity = issue.overridenSeverity();
return new org.sonar.core.issue.DefaultIssueBuilder()
.componentKey(componentKey)
.projectKey(projectKey)
.ruleKey(RuleKey.of(issue.ruleKey().repository(), issue.ruleKey().rule()))
.effortToFix(issue.effortToFix())
.line(issue.line())
.message(issue.message())
.severity(overridenSeverity != null ? overridenSeverity.name() : null)
.build();
}