Skip to content

Commit 05c398f

Browse files
Jami CogswellJami Cogswell
authored andcommitted
Add function for running autofix on a given repo
1 parent b0b8b62 commit 05c398f

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

extensions/ql-vscode/src/variant-analysis/view-autofixes.ts

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,19 @@ async function processSelectedRepositories(
312312
credentials,
313313
logger,
314314
);
315+
316+
// Run autofix.
317+
progressForRepo(progressUpdate(2, 3, `Running autofix`));
318+
await runAutofixForRepository(
319+
nwo,
320+
sarifFile,
321+
srcRootPath,
322+
localAutofixPath,
323+
autofixOutputStoragePath,
324+
repoTask.resultCount,
325+
logger,
326+
outputTextFiles,
327+
);
315328
},
316329
{
317330
title: `Processing ${nwo}`,
@@ -456,3 +469,19 @@ async function downloadPublicCommitSource(
456469
throw new Error(`Failed to download ${nwo} at ${sha}: ${errorMessage}`);
457470
}
458471
}
472+
473+
/**
474+
* Runs autofix for a given repository (nwo).
475+
*/
476+
async function runAutofixForRepository(
477+
nwo: string,
478+
sarifFile: string,
479+
srcRootPath: string,
480+
localAutofixPath: string,
481+
autofixOutputStoragePath: string,
482+
resultCount: number,
483+
logger: NotificationLogger,
484+
outputTextFiles: string[],
485+
): Promise<void> {
486+
// TODO
487+
}

0 commit comments

Comments
 (0)