assertThat(serverIssue.getModuleKey()).isEqualTo(module.getKey()); assertThat(serverIssue.getRuleRepository()).isEqualTo(rule.getRepositoryKey()); assertThat(serverIssue.getRuleKey()).isEqualTo(rule.getRuleKey());
assertThat(serverIssue.getModuleKey()).isEqualTo(module.getKey()); assertThat(serverIssue.getRuleRepository()).isEqualTo(rule.getRepositoryKey()); assertThat(serverIssue.getRuleKey()).isEqualTo(rule.getRuleKey());
public Sonarlint.ServerIssue toStorageIssue(ScannerInput.ServerIssue issue, Sonarlint.ProjectConfiguration projectConfiguration) { String sqPath = fileKeyToSqPath(projectConfiguration, issue.getModuleKey(), issue.getPath()); Sonarlint.ServerIssue.Builder builder = Sonarlint.ServerIssue.newBuilder() .setAssigneeLogin(issue.getAssigneeLogin()) .setChecksum(issue.getChecksum()) .setCreationDate(issue.getCreationDate()) .setKey(issue.getKey()) .setLine(issue.getLine()) .setManualSeverity(issue.getManualSeverity()) .setModuleKey(issue.getModuleKey()) .setMsg(issue.getMsg()) .setPath(sqPath) .setResolution(issue.getResolution()) .setRuleKey(issue.getRuleKey()) .setRuleRepository(issue.getRuleRepository()) .setSeverity(issue.getSeverity().name()) .setStatus(issue.getStatus()); if (issue.hasType()) { // type was added recently builder.setType(issue.getType()); } return builder.build(); }
private void store(ServerIssue issue) { String moduleKeyWithBranch = issue.getModuleKey(); AbstractProjectOrModule moduleOrProject = componentStore.getModule(moduleKeyWithBranch); if (moduleOrProject != null) { String componentKeyWithoutBranch = ComponentKeys.createEffectiveKey(moduleOrProject.key(), issue.hasPath() ? issue.getPath() : null); DefaultInputComponent r = (DefaultInputComponent) componentStore.getByKey(componentKeyWithoutBranch); if (r != null) { issuesCache.put(r.scannerId(), issue.getKey(), issue); return; } } // Deleted resource issuesCache.put(0, issue.getKey(), issue); }
private void store(ServerIssue issue) { String moduleKeyWithBranch = issue.getModuleKey(); AbstractProjectOrModule moduleOrProject = componentStore.getModule(moduleKeyWithBranch); if (moduleOrProject != null) { String componentKeyWithoutBranch = ComponentKeys.createEffectiveKey(moduleOrProject.key(), issue.hasPath() ? issue.getPath() : null); DefaultInputComponent r = (DefaultInputComponent) componentStore.getByKey(componentKeyWithoutBranch); if (r != null) { issuesCache.put(r.scannerId(), issue.getKey(), issue); return; } } // Deleted resource issuesCache.put(0, issue.getKey(), issue); }