Always read BQRS results file (#2741)
This commit is contained in:
@@ -199,34 +199,35 @@ export class VariantAnalysisResultsManager extends DisposableObject {
|
|||||||
);
|
);
|
||||||
const sarifPath = join(resultsDirectory, "results.sarif");
|
const sarifPath = join(resultsDirectory, "results.sarif");
|
||||||
const bqrsPath = join(resultsDirectory, "results.bqrs");
|
const bqrsPath = join(resultsDirectory, "results.bqrs");
|
||||||
|
|
||||||
|
let interpretedResults: AnalysisAlert[] | undefined;
|
||||||
|
let rawResults: AnalysisRawResults | undefined;
|
||||||
|
|
||||||
if (await pathExists(sarifPath)) {
|
if (await pathExists(sarifPath)) {
|
||||||
const interpretedResults = await this.readSarifResults(
|
interpretedResults = await this.readSarifResults(
|
||||||
sarifPath,
|
sarifPath,
|
||||||
fileLinkPrefix,
|
fileLinkPrefix,
|
||||||
);
|
);
|
||||||
|
|
||||||
return {
|
|
||||||
variantAnalysisId,
|
|
||||||
repositoryId: repoTask.repository.id,
|
|
||||||
interpretedResults,
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (await pathExists(bqrsPath)) {
|
if (await pathExists(bqrsPath)) {
|
||||||
const rawResults = await this.readBqrsResults(
|
rawResults = await this.readBqrsResults(
|
||||||
bqrsPath,
|
bqrsPath,
|
||||||
fileLinkPrefix,
|
fileLinkPrefix,
|
||||||
repoTask.sourceLocationPrefix,
|
repoTask.sourceLocationPrefix,
|
||||||
);
|
);
|
||||||
|
|
||||||
return {
|
|
||||||
variantAnalysisId,
|
|
||||||
repositoryId: repoTask.repository.id,
|
|
||||||
rawResults,
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
throw new Error("Missing results file");
|
if (!interpretedResults && !rawResults) {
|
||||||
|
throw new Error("Missing results file");
|
||||||
|
}
|
||||||
|
|
||||||
|
return {
|
||||||
|
variantAnalysisId,
|
||||||
|
repositoryId: repoTask.repository.id,
|
||||||
|
interpretedResults,
|
||||||
|
rawResults,
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
public async isVariantAnalysisRepoDownloaded(
|
public async isVariantAnalysisRepoDownloaded(
|
||||||
|
|||||||
Reference in New Issue
Block a user