Merge branch 'main' into redsun82/rust

This commit is contained in:
Paolo Tranquilli
2025-08-08 11:49:04 +02:00
467 changed files with 50912 additions and 72238 deletions

12
lib/init-action.js generated
View File

@@ -284,11 +284,11 @@ async function run() {
core.exportVariable("GOFLAGS", goFlags);
core.warning("Passing the GOFLAGS env parameter to the init action is deprecated. Please move this to the analyze action.");
}
if (config.languages.includes(languages_1.Language.swift) &&
if (config.languages.includes(languages_1.KnownLanguage.swift) &&
process.platform === "linux") {
logger.warning(`Swift analysis on Ubuntu runner images is no longer supported. Please migrate to a macOS runner if this affects you.`);
}
if (config.languages.includes(languages_1.Language.go) &&
if (config.languages.includes(languages_1.KnownLanguage.go) &&
process.platform === "linux") {
try {
const goBinaryPath = await io.which("go", true);
@@ -326,7 +326,7 @@ async function run() {
catch (e) {
logger.warning(`Failed to determine the location of the Go binary: ${e}`);
if (e instanceof actions_util_1.FileCmdNotFoundError) {
(0, diagnostics_1.addDiagnostic)(config, languages_1.Language.go, (0, diagnostics_1.makeDiagnostic)("go/workflow/file-program-unavailable", "The `file` program is required on Linux, but does not appear to be installed", {
(0, diagnostics_1.addDiagnostic)(config, languages_1.KnownLanguage.go, (0, diagnostics_1.makeDiagnostic)("go/workflow/file-program-unavailable", "The `file` program is required on Linux, but does not appear to be installed", {
markdownMessage: "CodeQL was unable to find the `file` program on this system. Ensure that the `file` program is installed on Linux runners and accessible.",
visibility: {
statusPage: true,
@@ -356,7 +356,7 @@ async function run() {
!(await (0, util_1.codeQlVersionAtLeast)(codeql, "2.20.4"))) {
core.exportVariable(kotlinLimitVar, "2.1.20");
}
if (config.languages.includes(languages_1.Language.cpp)) {
if (config.languages.includes(languages_1.KnownLanguage.cpp)) {
const envVar = "CODEQL_EXTRACTOR_CPP_TRAP_CACHING";
if (process.env[envVar]) {
logger.info(`Environment variable ${envVar} already set. Not en/disabling CodeQL C++ TRAP caching support`);
@@ -372,7 +372,7 @@ async function run() {
}
}
// Set CODEQL_EXTRACTOR_CPP_BUILD_MODE_NONE
if (config.languages.includes(languages_1.Language.cpp)) {
if (config.languages.includes(languages_1.KnownLanguage.cpp)) {
const bmnVar = "CODEQL_EXTRACTOR_CPP_BUILD_MODE_NONE";
const value = process.env[bmnVar] ||
(await features.getValue(feature_flags_1.Feature.CppBuildModeNone, codeql));
@@ -387,7 +387,7 @@ async function run() {
// However, there is no need to let users know about the experimental feature flag at
// this point, if they want rust support they should chose a version which supports it
// publicly.
if (config.languages.includes(languages_1.Language.rust) &&
if (config.languages.includes(languages_1.KnownLanguage.rust) &&
!(await codeql.resolveLanguages()).rust) {
throw new util_1.ConfigurationError("Rust analysis is supported from CodeQL version 2.22.1 or higher.");
}