Add FF to fail if macOS version is unsupported

This commit is contained in:
Michael B. Gale
2026-10-09 16:01:15 +01:00
parent ff832f1444
commit d09e9c0eb9
5 changed files with 103 additions and 9 deletions

18
lib/entry-points.js generated
View File

@@ -172115,6 +172115,11 @@ var featureConfig = {
envVar: "CODEQL_ACTION_START_PROXY_USE_FEATURES_RELEASE",
minimumVersion: void 0
},
["swift_skip_unsupported_traced_analysis" /* SwiftSkipUnsupportedTracedAnalysis */]: {
defaultValue: false,
envVar: "CODEQL_ACTION_SWIFT_SKIP_UNSUPPORTED_TRACED_ANALYSIS",
minimumVersion: void 0
},
["tools_repository_property" /* ToolsRepositoryProperty */]: {
defaultValue: false,
envVar: "CODEQL_ACTION_TOOLS_REPOSITORY_PROPERTY",
@@ -185973,13 +185978,15 @@ async function isSwiftCompatible(action, config, codeql) {
);
return;
}
const skipUnsupportedTracedAnalysis = await action.features.getValue(
"swift_skip_unsupported_traced_analysis" /* SwiftSkipUnsupportedTracedAnalysis */
);
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 */,
@@ -185992,7 +185999,7 @@ async function isSwiftCompatible(action, config, codeql) {
macOSVersion: version.toString()
},
markdownMessage: baseMessage,
severity: "warning",
severity: skipUnsupportedTracedAnalysis ? "error" : "warning",
visibility: {
cliSummaryTable: true,
statusPage: true,
@@ -186001,6 +186008,11 @@ async function isSwiftCompatible(action, config, codeql) {
}
)
);
if (skipUnsupportedTracedAnalysis) {
throw new ConfigurationError(baseMessage);
} else {
action.logger.warning(baseMessage);
}
}
}
@@ -186522,7 +186534,7 @@ async function run3(actionState) {
enableFileCoverageInformation: fileCoverageResult.enabled,
logger: logger2
});
await isSwiftCompatible(actionState, config, codeql);
await isSwiftCompatible(actionStateWithFeatures, config, codeql);
if (repositoryPropertiesResult.isFailure()) {
addNoLanguageDiagnostic(
config,