use of org.sonarsource.sonarlint.core.container.model.DefaultServerIssue in project sonarlint-core by SonarSource.
the class IssueStoreReaderTest method createApiIssue.
private ServerIssue createApiIssue(String moduleKey, String filePath) {
DefaultServerIssue issue = new DefaultServerIssue();
issue.setFilePath(filePath);
issue.setModuleKey(moduleKey);
return issue;
}
use of org.sonarsource.sonarlint.core.container.model.DefaultServerIssue in project sonarlint-core by SonarSource.
the class IssueStoreReader method transformIssue.
private static ServerIssue transformIssue(ScannerInput.ServerIssue pbIssue, String moduleKey, String filePath) {
DefaultServerIssue issue = new DefaultServerIssue();
issue.setAssigneeLogin(pbIssue.getAssigneeLogin());
issue.setAssigneeLogin(pbIssue.getAssigneeLogin());
issue.setChecksum(pbIssue.getChecksum());
issue.setLine(pbIssue.getLine());
issue.setFilePath(filePath);
issue.setModuleKey(moduleKey);
issue.setManualSeverity(pbIssue.getManualSeverity());
issue.setMessage(pbIssue.getMsg());
issue.setSeverity(pbIssue.getSeverity().name());
if (pbIssue.hasType()) {
// type was added recently
issue.setType(pbIssue.getType());
}
issue.setCreationDate(Instant.ofEpochMilli(pbIssue.getCreationDate()));
issue.setResolution(pbIssue.getResolution());
issue.setKey(pbIssue.getKey());
issue.setRuleKey(pbIssue.getRuleRepository() + ":" + pbIssue.getRuleKey());
return issue;
}
Aggregations