Check if macOS version is unsupported

This commit is contained in:
Michael B. Gale
2026-10-09 15:51:31 +01:00
parent 094875d25b
commit db45eabc68
3 changed files with 133 additions and 0 deletions

31
lib/entry-points.js generated
View File

@@ -186170,6 +186170,8 @@ async function getToolsInput(action, repositoryProperties) {
}
// src/languages/swift.ts
var SWIFT_TRACED_UNSUPPORTED_MACOS = 27;
var SWIFT_TRACED_UNSUPPORTED_XCODE = 27;
async function isSwiftCompatible(action, config, codeql) {
if (!config.languages.includes("swift" /* swift */)) {
return;
@@ -186189,6 +186191,35 @@ async function isSwiftCompatible(action, config, codeql) {
);
return;
}
if (version.major >= SWIFT_TRACED_UNSUPPORTED_MACOS) {
const baseMessage = [
`Traced Swift analysis is not supported on macOS ${SWIFT_TRACED_UNSUPPORTED_MACOS} or above.`,
`Configure your analysis to run on macOS ${SWIFT_TRACED_UNSUPPORTED_MACOS - 1} or below`,
`and XCode ${SWIFT_TRACED_UNSUPPORTED_XCODE - 1} or below.`
].join(" ");
action.logger.warning(baseMessage);
addDiagnostic(
config,
"swift" /* swift */,
makeDiagnostic(
"codeql-action/unsupported-traced-swift-analysis-macos",
"Traced Swift analysis is not supported on this version of macOS",
{
attributes: {
languages: config.languages,
macOSVersion: version.toString()
},
markdownMessage: baseMessage,
severity: "warning",
visibility: {
cliSummaryTable: true,
statusPage: true,
telemetry: true
}
}
)
);
}
}
// src/status-report/tools-download.ts