Skip to content

Commit e75245f

Browse files
Apply suggestions from code review
Co-authored-by: Henry Mercer <henry.mercer@me.com>
1 parent e2f72f1 commit e75245f

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

src/codeql.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1002,7 +1002,7 @@ test(
10021002
{}
10031003
);
10041004

1005-
test("does not use injected config", async (t: ExecutionContext<unknown>) => {
1005+
test("does not pass a code scanning config or qlconfig file to the CLI when CLI config passing is disabled", async (t: ExecutionContext<unknown>) => {
10061006
const runnerConstructorStub = stubToolRunnerConstructor();
10071007
const codeqlObject = await codeql.getCodeQLForTesting();
10081008
sinon
@@ -1027,10 +1027,10 @@ test("does not use injected config", async (t: ExecutionContext<unknown>) => {
10271027

10281028
// should not have passed a qlconfig file
10291029
const qlconfigArg = args.find((arg: string) => arg.startsWith("--qlconfig="));
1030-
t.falsy(qlconfigArg, "Should NOT have injected a codescanning config");
1030+
t.falsy(qlconfigArg, "Should NOT have passed a qlconfig file");
10311031
});
10321032

1033-
test("uses injected config AND qlconfig", async (t: ExecutionContext<unknown>) => {
1033+
test("passes a code scanning config AND qlconfig to the CLI when CLI config passing is enabled", async (t: ExecutionContext<unknown>) => {
10341034
const runnerConstructorStub = stubToolRunnerConstructor();
10351035
const codeqlObject = await codeql.getCodeQLForTesting();
10361036
sinon

src/config-utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1975,7 +1975,7 @@ export async function generateRegistries(
19751975
!(await codeQlVersionAbove(codeQL, CODEQL_VERSION_GHES_PACK_DOWNLOAD))
19761976
) {
19771977
throw new Error(
1978-
`'registries' input is not supported on CodeQL versions less than ${CODEQL_VERSION_GHES_PACK_DOWNLOAD}.`
1978+
`The 'registries' input is not supported on CodeQL CLI versions earlier than ${CODEQL_VERSION_GHES_PACK_DOWNLOAD}. Please upgrade to CodeQL CLI version ${CODEQL_VERSION_GHES_PACK_DOWNLOAD} or later.`
19791979
);
19801980
}
19811981

src/init.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,8 @@ export async function runInit(
112112
try {
113113
if (await codeQlVersionAbove(codeql, CODEQL_VERSION_NEW_TRACING)) {
114114
// Only create the qlconfig file if we haven't already created it.
115-
// If we are not parsing the config file in the cli, then the qlconfig
116-
// file has already been created.
115+
// If we are parsing the config file in the Action, then we already created the qlconfig
116+
// file in `configUtils.generateRegistries`.
117117
let registriesAuthTokens: string | undefined;
118118
let qlconfigFile: string | undefined;
119119
if (await util.useCodeScanningConfigInCli(codeql, featureEnablement)) {

0 commit comments

Comments
 (0)