Package org.sonar.core.issue

Examples of org.sonar.core.issue.DefaultIssueBuilder


    DefaultIssue issue = newIssue(violation);
    return initAndAddIssue(issue, violation);
  }

  private DefaultIssue newIssue(Violation violation) {
    return (DefaultIssue) 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())
View Full Code Here


    this.cache = cache;
  }

  @Override
  public IssueBuilder newIssueBuilder() {
    return new DefaultIssueBuilder().componentKey(component.key()).projectKey(project.getKey());
  }
View Full Code Here

      Rule rule = getNullableRuleByKey(ruleKey);
      if (rule == null) {
        throw new IllegalArgumentException("Unknown rule: " + ruleKey);
      }

      DefaultIssue issue = new DefaultIssueBuilder()
        .componentKey(component.getKey())
        .projectKey(project.getKey())
        .line(line)
        .message(!Strings.isNullOrEmpty(message) ? message : rule.getName())
        .severity(Objects.firstNonNull(severity, Severity.MAJOR))
View Full Code Here

TOP

Related Classes of org.sonar.core.issue.DefaultIssueBuilder

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.