Skip to content

Commit c310f09

Browse files
henrymerceraeisenberg
authored andcommitted
Fix name of qlconfig file argument
1 parent 4366485 commit c310f09

6 files changed

+14
-14
lines changed

lib/codeql.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/codeql.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/codeql.test.js

+4-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/codeql.test.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/codeql.test.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -1027,7 +1027,7 @@ test("does not pass a code scanning config or qlconfig file to the CLI when CLI
10271027

10281028
// should not have passed a qlconfig file
10291029
const hasQlconfigArg = args.some((arg: string) =>
1030-
arg.startsWith("--qlconfig=")
1030+
arg.startsWith("--qlconfig-file=")
10311031
);
10321032
t.false(hasQlconfigArg, "Should NOT have passed a qlconfig file");
10331033
});
@@ -1059,7 +1059,7 @@ test("passes a code scanning config AND qlconfig to the CLI when CLI config pass
10591059

10601060
// should have passed a qlconfig file
10611061
const hasQlconfigArg = args.some((arg: string) =>
1062-
arg.startsWith("--qlconfig=")
1062+
arg.startsWith("--qlconfig-file=")
10631063
);
10641064
t.truthy(hasQlconfigArg, "Should have injected a codescanning config");
10651065
});
@@ -1092,7 +1092,7 @@ test("passes a code scanning config BUT NOT a qlconfig to the CLI when CLI confi
10921092

10931093
// should not have passed a qlconfig file
10941094
const hasQlconfigArg = args.some((arg: string) =>
1095-
arg.startsWith("--qlconfig=")
1095+
arg.startsWith("--qlconfig-file=")
10961096
);
10971097
t.false(hasQlconfigArg, "should NOT have injected a qlconfig");
10981098
});
@@ -1117,7 +1117,7 @@ test("does not pass a qlconfig to the CLI when it is undefined", async (t: Execu
11171117

11181118
const args = runnerConstructorStub.firstCall.args[1] as any[];
11191119
const hasQlconfigArg = args.some((arg: string) =>
1120-
arg.startsWith("--qlconfig=")
1120+
arg.startsWith("--qlconfig-file=")
11211121
);
11221122
t.false(hasQlconfigArg, "should NOT have injected a qlconfig");
11231123
});

src/codeql.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ export const CODEQL_VERSION_BETTER_RESOLVE_LANGUAGES = "2.10.3";
291291
export const CODEQL_VERSION_SECURITY_EXPERIMENTAL_SUITE = "2.12.1";
292292

293293
/**
294-
* Versions 2.12.4+ of the CodeQL CLI support the `--qlconfig` flag in calls to `database init`.
294+
* Versions 2.12.4+ of the CodeQL CLI support the `--qlconfig-file` flag in calls to `database init`.
295295
*/
296296
export const CODEQL_VERSION_INIT_WITH_QLCONFIG = "2.12.4";
297297

@@ -622,7 +622,7 @@ export async function getCodeQLForCmd(
622622
qlconfigFile !== undefined &&
623623
(await util.codeQlVersionAbove(this, CODEQL_VERSION_INIT_WITH_QLCONFIG))
624624
) {
625-
extraArgs.push(`--qlconfig=${qlconfigFile}`);
625+
extraArgs.push(`--qlconfig-file=${qlconfigFile}`);
626626
}
627627
await runTool(
628628
cmd,

0 commit comments

Comments
 (0)