Skip to content

Commit

Permalink
Fix --qlconfig-file option
Browse files Browse the repository at this point in the history
  • Loading branch information
aeisenberg committed Mar 7, 2023
1 parent 6ef6e50 commit 8af7c45
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/codeql.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1026,7 +1026,7 @@ test("does not pass a code scanning config or qlconfig file to the CLI when CLI

// should not have passed a qlconfig file
const hasQlconfigArg = args.some((arg: string) =>
arg.startsWith("--qlconfig=")
arg.startsWith("--qlconfig-file=")
);
t.false(hasQlconfigArg, "Should NOT have passed a qlconfig file");
});
Expand Down Expand Up @@ -1056,7 +1056,7 @@ test("passes a code scanning config AND qlconfig to the CLI when CLI config pass

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

// should have passed a qlconfig file
const hasQlconfigArg = args.some((arg: string) =>
arg.startsWith("--qlconfig=")
arg.startsWith("--qlconfig-file=")
);
t.false(hasQlconfigArg, "Should have injected a codescanning config");
});
Expand Down
4 changes: 2 additions & 2 deletions src/codeql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ export const CODEQL_VERSION_BETTER_RESOLVE_LANGUAGES = "2.10.3";
export const CODEQL_VERSION_SECURITY_EXPERIMENTAL_SUITE = "2.12.1";

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

Expand Down Expand Up @@ -621,7 +621,7 @@ export async function getCodeQLForCmd(
if (
await util.codeQlVersionAbove(this, CODEQL_VERSION_INIT_WITH_QLCONFIG)
) {
extraArgs.push(`--qlconfig=${qlconfigFile}`);
extraArgs.push(`--qlconfig-file=${qlconfigFile}`);
}
await runTool(
cmd,
Expand Down

0 comments on commit 8af7c45

Please sign in to comment.