use of org.sonarsource.sonarlint.core.proto.Sonarlint.ServerIssue in project sonarlint-core by SonarSource.
the class PartialUpdater method updateFileIssues.
public void updateFileIssues(ServerApiHelper serverApiHelper, ProjectBinding projectBinding, Sonarlint.ProjectConfiguration projectConfiguration, String ideFilePath, boolean fetchTaintVulnerabilities, @Nullable String branchName, ProgressMonitor progress) {
var serverIssuesPath = projectStoragePaths.getServerIssuesPath(projectBinding.projectKey());
var issueStore = issueStoreFactory.apply(serverIssuesPath);
var fileKey = issueStorePaths.idePathToFileKey(projectConfiguration, projectBinding, ideFilePath);
if (fileKey == null) {
return;
}
List<ServerIssue> issues;
try {
issues = downloader.download(serverApiHelper, fileKey, projectConfiguration, fetchTaintVulnerabilities, branchName, progress);
} 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);
}
Aggregations