mirror of
https://github.com/github/codeql-action.git
synced 2026-04-26 16:58:47 +00:00
Overlays: allow any build mode for Go
We have a check that a traced language can only run overlay analysis with build-mode: none, but Go does not currently declare support for BMN, even though it has a similar autobuild mode that will work for overlay analysis. This commit adds a hard-coded exception to that check, allowing any build mode for Go. This is intended as a short-term solution until Go declares BMN support. It should be safe, since we can choose not to enable the feature flag for Go repos using traced builds.
This commit is contained in:
Generated
+7
-1
@@ -87860,7 +87860,13 @@ async function getOverlayDatabaseMode(codeql, repository, features, languages, s
|
||||
return nonOverlayAnalysis;
|
||||
}
|
||||
if (buildMode !== "none" /* None */ && (await Promise.all(
|
||||
languages.map(async (l) => await codeql.isTracedLanguage(l))
|
||||
languages.map(
|
||||
async (l) => l !== "go" /* go */ && // Workaround to allow overlay analysis for Go with any build
|
||||
// mode, since it does not yet support BMN. The Go autobuilder and/or extractor will
|
||||
// ensure that overlay-base databases are only created for supported Go build setups,
|
||||
// and that we'll fall back to full databases in other cases.
|
||||
await codeql.isTracedLanguage(l)
|
||||
)
|
||||
)).some(Boolean)) {
|
||||
logger.warning(
|
||||
`Cannot build an ${overlayDatabaseMode} database because build-mode is set to "${buildMode}" instead of "none". Falling back to creating a normal full database instead.`
|
||||
|
||||
+8
-1
@@ -723,7 +723,14 @@ export async function getOverlayDatabaseMode(
|
||||
buildMode !== BuildMode.None &&
|
||||
(
|
||||
await Promise.all(
|
||||
languages.map(async (l) => await codeql.isTracedLanguage(l)),
|
||||
languages.map(
|
||||
async (l) =>
|
||||
l !== KnownLanguage.go && // Workaround to allow overlay analysis for Go with any build
|
||||
// mode, since it does not yet support BMN. The Go autobuilder and/or extractor will
|
||||
// ensure that overlay-base databases are only created for supported Go build setups,
|
||||
// and that we'll fall back to full databases in other cases.
|
||||
(await codeql.isTracedLanguage(l)),
|
||||
),
|
||||
)
|
||||
).some(Boolean)
|
||||
) {
|
||||
|
||||
Reference in New Issue
Block a user