Improve method name for addQueriesFromWorkflow.

This commit is contained in:
Henry Mercer 2023-10-02 17:35:03 +01:00
parent 37a2d1fe3c
commit 7b16c0dad0
3 changed files with 7 additions and 7 deletions

6
lib/config-utils.js generated
View file

@ -489,7 +489,7 @@ async function getRawLanguages(languagesInput, repository, logger) {
return { rawLanguages, autodetected }; return { rawLanguages, autodetected };
} }
exports.getRawLanguages = getRawLanguages; exports.getRawLanguages = getRawLanguages;
async function addQueriesAndPacksFromWorkflow(codeQL, queriesInput, languages, resultMap, tempDir, workspacePath, apiDetails, features, logger) { async function addQueriesFromWorkflow(codeQL, queriesInput, languages, resultMap, tempDir, workspacePath, apiDetails, features, logger) {
queriesInput = queriesInput.trim(); queriesInput = queriesInput.trim();
// "+" means "don't override config file" - see shouldAddConfigFileQueries // "+" means "don't override config file" - see shouldAddConfigFileQueries
queriesInput = queriesInput.replace(/^\+/, ""); queriesInput = queriesInput.replace(/^\+/, "");
@ -527,7 +527,7 @@ async function getDefaultConfig(languagesInput, rawQueriesInput, rawPacksInput,
} }
: {}; : {};
if (rawQueriesInput) { if (rawQueriesInput) {
await addQueriesAndPacksFromWorkflow(codeQL, rawQueriesInput, languages, queries, tempDir, workspacePath, apiDetails, features, logger); await addQueriesFromWorkflow(codeQL, rawQueriesInput, languages, queries, tempDir, workspacePath, apiDetails, features, logger);
} }
const { trapCaches, trapCacheDownloadTime } = await downloadCacheWithTime(trapCachingEnabled, codeQL, languages, logger); const { trapCaches, trapCacheDownloadTime } = await downloadCacheWithTime(trapCachingEnabled, codeQL, languages, logger);
return { return {
@ -610,7 +610,7 @@ async function loadConfig(languagesInput, rawQueriesInput, rawPacksInput, config
// unless they're prefixed with "+", in which case they supplement those // unless they're prefixed with "+", in which case they supplement those
// in the config file. // in the config file.
if (rawQueriesInput) { if (rawQueriesInput) {
await addQueriesAndPacksFromWorkflow(codeQL, rawQueriesInput, languages, queries, tempDir, workspacePath, apiDetails, features, logger); await addQueriesFromWorkflow(codeQL, rawQueriesInput, languages, queries, tempDir, workspacePath, apiDetails, features, logger);
} }
if (shouldAddConfigFileQueries(rawQueriesInput) && if (shouldAddConfigFileQueries(rawQueriesInput) &&
QUERIES_PROPERTY in parsedYAML) { QUERIES_PROPERTY in parsedYAML) {

File diff suppressed because one or more lines are too long

View file

@ -973,7 +973,7 @@ export async function getRawLanguages(
return { rawLanguages, autodetected }; return { rawLanguages, autodetected };
} }
async function addQueriesAndPacksFromWorkflow( async function addQueriesFromWorkflow(
codeQL: CodeQL, codeQL: CodeQL,
queriesInput: string, queriesInput: string,
languages: string[], languages: string[],
@ -1061,7 +1061,7 @@ export async function getDefaultConfig(
} }
: {}; : {};
if (rawQueriesInput) { if (rawQueriesInput) {
await addQueriesAndPacksFromWorkflow( await addQueriesFromWorkflow(
codeQL, codeQL,
rawQueriesInput, rawQueriesInput,
languages, languages,
@ -1209,7 +1209,7 @@ async function loadConfig(
// unless they're prefixed with "+", in which case they supplement those // unless they're prefixed with "+", in which case they supplement those
// in the config file. // in the config file.
if (rawQueriesInput) { if (rawQueriesInput) {
await addQueriesAndPacksFromWorkflow( await addQueriesFromWorkflow(
codeQL, codeQL,
rawQueriesInput, rawQueriesInput,
languages, languages,