예제 #1
0
 private DefaultIssue newIssue(Violation violation) {
   return new DefaultIssueBuilder()
       .componentKey(violation.getResource().getEffectiveKey())
       // Project can be null but Violation not used by scan2
       .projectKey(project.getRoot().getEffectiveKey())
       .ruleKey(RuleKey.of(violation.getRule().getRepositoryKey(), violation.getRule().getKey()))
       .effortToFix(violation.getCost())
       .line(violation.getLineId())
       .message(violation.getMessage())
       .severity(violation.getSeverity() != null ? violation.getSeverity().name() : null)
       .build();
 }