Skip to content

Commit 1e08968

Browse files
committed
Add support for bqrs diff --result-sets option
1 parent 211d0b8 commit 1e08968

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

extensions/ql-vscode/src/codeql-cli/cli-version.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ interface VersionResult {
1111

1212
export interface CliFeatures {
1313
queryServerRunQueries?: boolean;
14+
bqrsDiffResultSets?: boolean;
1415
}
1516

1617
export interface VersionAndFeatures {

extensions/ql-vscode/src/codeql-cli/cli.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,7 @@ interface BqrsDecodeOptions {
211211

212212
interface BqrsDiffOptions {
213213
retainResultSets?: string[];
214+
resultSets?: Array<[string, string]>;
214215
}
215216

216217
type OnLineCallback = (line: string) => Promise<string | undefined>;
@@ -1283,6 +1284,12 @@ export class CodeQLCliServer implements Disposable {
12831284
...(options?.retainResultSets
12841285
? ["--retain-result-sets", options.retainResultSets.join(",")]
12851286
: []),
1287+
...(options?.resultSets
1288+
? options.resultSets.flatMap(([left, right]) => [
1289+
"--result-sets",
1290+
`${left},${right}`,
1291+
])
1292+
: []),
12861293
bqrsPath1,
12871294
bqrsPath2,
12881295
],

0 commit comments

Comments
 (0)