Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 4 additions & 14 deletions src/sast/controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,17 +45,9 @@ export class SastController implements vscode.Disposable {
this.logger.info(`Running ${kind} scan for ${document.uri.fsPath}...`);

try {
const result = await vscode.window.withProgress<DockerScanResult>(
{
location: vscode.ProgressLocation.Notification,
title: `DevGuard: running ${kind.toUpperCase()} scan...`,
cancellable: true,
},
async (_progress, cancelToken) => {
cancelToken.onCancellationRequested(() => controller.abort());

return runDockerScanner({ kind, signal: controller.signal }, document.uri);
},
const result = await runDockerScanner(
{ kind, signal: controller.signal },
document.uri,
);

if (this.inflight.get(key) !== controller) {
Expand Down Expand Up @@ -93,9 +85,7 @@ export class SastController implements vscode.Disposable {
);

if (result.exitCode !== 0) {
this.logger.info(
`DevGuard ${kind} scanner exited ${result.exitCode}.`,
);
this.logger.info(`DevGuard ${kind} scanner exited ${result.exitCode}.`);
}
} catch (err) {
if ((err as Error).message === "Docker scan aborted") {
Expand Down