diff --git a/lib/autobuild.js b/lib/autobuild.js index adf4e82a84..1c7d64dfed 100644 --- a/lib/autobuild.js +++ b/lib/autobuild.js @@ -61,16 +61,16 @@ async function determineAutobuildLanguages(config, featureFlags, logger) { * This special case behavior should be removed as part of the next major * version of the CodeQL Action. */ - const autobuildLanguagesNoGo = autobuildLanguages.filter((l) => l !== languages_1.Language.go); + const autobuildLanguagesWithoutGo = autobuildLanguages.filter((l) => l !== languages_1.Language.go); const languages = []; // First run the autobuilder for the first non-Go traced language, if one // exists. - if (autobuildLanguagesNoGo[0] !== undefined) { - languages.push(autobuildLanguagesNoGo[0]); + if (autobuildLanguagesWithoutGo[0] !== undefined) { + languages.push(autobuildLanguagesWithoutGo[0]); } // If Go is requested, run the Go autobuilder last to ensure it doesn't // interfere with the other autobuilder. - if (autobuildLanguages.length !== autobuildLanguagesNoGo.length) { + if (autobuildLanguages.length !== autobuildLanguagesWithoutGo.length) { languages.push(languages_1.Language.go); } logger.debug(`Will autobuild ${languages.join(" and ")}.`); @@ -81,8 +81,8 @@ async function determineAutobuildLanguages(config, featureFlags, logger) { // categories, potentially leading to a "stale tips" situation where alerts // that should be fixed remain on a repo since they are linked to SARIF // categories that are no longer updated. - if (autobuildLanguagesNoGo.length > 1) { - logger.warning(`We will only automatically build ${languages.join(" and ")} code. If you wish to scan ${autobuildLanguagesNoGo + if (autobuildLanguagesWithoutGo.length > 1) { + logger.warning(`We will only automatically build ${languages.join(" and ")} code. If you wish to scan ${autobuildLanguagesWithoutGo .slice(1) .join(" and ")}, you must replace this call with custom build steps.`); } diff --git a/lib/autobuild.js.map b/lib/autobuild.js.map index 73852ac509..b9c1e9dda3 100644 --- a/lib/autobuild.js.map +++ b/lib/autobuild.js.map @@ -1 +1 @@ -{"version":3,"file":"autobuild.js","sourceRoot":"","sources":["../src/autobuild.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,qCAAqC;AAGrC,2CAAyD;AAEzD,6CAA+B;AAExB,KAAK,UAA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AC,EAAE;QACrC,MAAM,CAAC,OAAO,CACZ,oCAAoC,SAAS,CAAC,IAAI,CAChD,OAAO,CACR,8BAA8B,sBAAsB;aAClD,KAAK,CAAC,CAAC,CAAC;aACR,IAAI,CAAC,OAAO,CAAC,uDAAuD,CACxE,CAAC;KACH;IAED,OAAO,SAAS,CAAC;AACnB,CAAC;AArFD,kEAqFC;AAEM,KAAK,UAAU,YAAY,CAChC,QAAkB,EAClB,MAA0B,EAC1B,MAAc;IAEd,MAAM,CAAC,UAAU,CAAC,qCAAqC,QAAQ,OAAO,CAAC,CAAC;IACxE,MAAM,MAAM,GAAG,MAAM,IAAA,kBAAS,EAAC,MAAM,CAAC,SAAS,CAAC,CAAC;IACjD,MAAM,MAAM,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;IACpC,MAAM,CAAC,QAAQ,EAAE,CAAC;AACpB,CAAC;AATD,oCASC"} \ No newline at end of file +{"version":3,"file":"autobuild.js","sourceRoot":"","sources":["../src/autobuild.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,qCAAqC;AAGrC,2CAAyD;AAEzD,6CAA+B;AAExB,KAAK,UAAU,2BAA2B,CAC/C,MAA0B,EAC1B,YAA0B,EAC1B,MAAc;IAEd,MAAM,mCAAmC,GACvC,MAAM,IAAI,CAAC,mCAAmC,CAAC,YAAY,CAAC,CAAC;IAC/D,0CAA0C;IAC1C,mFAAmF;IACnF,oFAAoF;IACpF,4EAA4E;IAC5E,MAAM,kBAAkB,GAAG,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CACvD,IAAA,4BAAgB,EAAC,CAAC,EAAE,mCAAmC,EAAE,MAAM,CAAC,CACjE,CAAC;IAEF,IAAI,CAAC,kBAAkB,EAAE;QACvB,MAAM,CAAC,IAAI,CACT,iEAAiE,CAClE,CAAC;QACF,OAAO,SAAS,CAAC;KAClB;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;OA0BG;IACH,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QAAQ,EAAE,CAAC;AACpB,CAAC;AATD,oCASC"} \ No newline at end of file diff --git a/src/autobuild.ts b/src/autobuild.ts index e0a9524ebf..6f5e52d613 100644 --- a/src/autobuild.ts +++ b/src/autobuild.ts @@ -54,19 +54,19 @@ export async function determineAutobuildLanguages( * This special case behavior should be removed as part of the next major * version of the CodeQL Action. */ - const autobuildLanguagesNoGo = autobuildLanguages.filter( + const autobuildLanguagesWithoutGo = autobuildLanguages.filter( (l) => l !== Language.go ); const languages: Language[] = []; // First run the autobuilder for the first non-Go traced language, if one // exists. - if (autobuildLanguagesNoGo[0] !== undefined) { - languages.push(autobuildLanguagesNoGo[0]); + if (autobuildLanguagesWithoutGo[0] !== undefined) { + languages.push(autobuildLanguagesWithoutGo[0]); } // If Go is requested, run the Go autobuilder last to ensure it doesn't // interfere with the other autobuilder. - if (autobuildLanguages.length !== autobuildLanguagesNoGo.length) { + if (autobuildLanguages.length !== autobuildLanguagesWithoutGo.length) { languages.push(Language.go); } @@ -79,11 +79,11 @@ export async function determineAutobuildLanguages( // categories, potentially leading to a "stale tips" situation where alerts // that should be fixed remain on a repo since they are linked to SARIF // categories that are no longer updated. - if (autobuildLanguagesNoGo.length > 1) { + if (autobuildLanguagesWithoutGo.length > 1) { logger.warning( `We will only automatically build ${languages.join( " and " - )} code. If you wish to scan ${autobuildLanguagesNoGo + )} code. If you wish to scan ${autobuildLanguagesWithoutGo .slice(1) .join(" and ")}, you must replace this call with custom build steps.` );