Skip to content

Commit 03585af

Browse files
Jami CogswellJami Cogswell
authored andcommitted
Add function for setting variable autofix args
1 parent 5dfaf3f commit 03585af

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

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

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -542,3 +542,29 @@ async function getRepoStoragePaths(
542542
),
543543
};
544544
}
545+
546+
/**
547+
* Creates autofix arguments that vary depending on the run.
548+
*/
549+
function createVarAutofixArgs(
550+
outputTextFilePath: string,
551+
fixDescriptionFilePath: string,
552+
transcriptFilePath: string,
553+
alertNumber?: number, // Optional parameter for specific alert
554+
): string[] {
555+
const args = [
556+
"--output",
557+
outputTextFilePath,
558+
"--fix-description",
559+
fixDescriptionFilePath,
560+
"--transcript",
561+
transcriptFilePath,
562+
];
563+
564+
// Add alert number argument if provided
565+
if (alertNumber !== undefined) {
566+
args.push("--only-alert-number", alertNumber.toString());
567+
}
568+
569+
return args;
570+
}

0 commit comments

Comments
 (0)