use of org.sonarsource.sonarlint.core.container.connected.IssueStore in project sonarlint-core by SonarSource.
the class PartialUpdater method updateFileIssues.
public void updateFileIssues(String moduleKey, String filePath) {
Path serverIssuesPath = storagePaths.getServerIssuesPath(moduleKey);
IssueStore issueStore = issueStoreFactory.apply(serverIssuesPath);
String fileKey = issueStoreReader.getFileKey(moduleKey, filePath);
List<ServerIssue> issues;
try {
issues = downloader.apply(fileKey);
} catch (Exception e) {
// null as cause so that it doesn't get wrapped
throw new DownloadException("Failed to update file issues: " + e.getMessage(), null);
}
issueStore.save(issues);
}
use of org.sonarsource.sonarlint.core.container.connected.IssueStore in project sonarlint-core by SonarSource.
the class IssueStoreReader method getServerIssues.
public List<ServerIssue> getServerIssues(String moduleKey, String filePath) {
String fileKey = getFileKey(moduleKey, filePath);
Path serverIssuesPath = storagePaths.getServerIssuesPath(moduleKey);
IssueStore issueStore = issueStoreFactory.apply(serverIssuesPath);
List<ScannerInput.ServerIssue> loadedIssues = issueStore.load(fileKey);
return loadedIssues.stream().map(pbIssue -> transformIssue(pbIssue, moduleKey, filePath)).collect(Collectors.toList());
}
Aggregations