Package org.sonar.api.batch.sensor.issue.Issue

Examples of org.sonar.api.batch.sensor.issue.Issue.Severity


    }
    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();
  }
View Full Code Here


          jsonWriter.prop("path", inputPath.relativePath());
        }
        jsonWriter.prop("message", issue.message())
          .prop("effortToFix", issue.effortToFix())
          .prop("line", issue.line());
        Severity overridenSeverity = issue.overridenSeverity();
        if (overridenSeverity != null) {
          jsonWriter.prop("severity", overridenSeverity.name());
        }
        jsonWriter.endObject();
      }
      jsonWriter.endArray()
        .endObject()
View Full Code Here

    }
    value.put(issue.message());
    value.put(issue.effortToFix());
    value.put(issue.ruleKey().repository());
    value.put(issue.ruleKey().rule());
    Severity overridenSeverity = issue.overridenSeverity();
    if (overridenSeverity == null) {
      value.putNull();
    } else {
      value.put(overridenSeverity.ordinal());
    }
  }
View Full Code Here

TOP

Related Classes of org.sonar.api.batch.sensor.issue.Issue.Severity

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.