Skip to content

Commit e4a6fb3

Browse files
authored
[BUG] SARIF report is not refreshed after new test generation. #364 (#365)
1 parent 7739d4d commit e4a6fb3

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

vscode-plugin/src/responses/responseHandler.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ export class TestsResponseHandler implements ResponseHandler<TestsResponse> {
6969
// Show and log the results in UI
7070
{
7171
let firstTest = true;
72-
const SarifReportFiles = [];
72+
const SarifReportFiles: Uri[] = [];
7373
for (const test of testsSourceList) {
7474
const localPath = pathUtils.substituteLocalPath(test.getFilepath());
7575

@@ -98,7 +98,10 @@ export class TestsResponseHandler implements ResponseHandler<TestsResponse> {
9898
if (!sarifExt.isActive) {
9999
await sarifExt.activate();
100100
}
101-
sarifExt.exports.openLogs(SarifReportFiles);
101+
// SARIF plugin doesn't monitor the file change event
102+
// To refresh the report we close and open report
103+
await sarifExt.exports.closeLogs(SarifReportFiles)
104+
.then(sarifExt.exports.openLogs(SarifReportFiles));
102105
}
103106
}
104107
}

0 commit comments

Comments
 (0)