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
committed by GitHub
parent f48ee7b3f6
commit 416a4d37b2
5 changed files with 103 additions and 9 deletions

18
lib/entry-points.js generated
View File

@@ -172172,6 +172172,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",
@@ -186104,13 +186109,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 */,
@@ -186123,7 +186130,7 @@ async function isSwiftCompatible(action, config, codeql) {
macOSVersion: version.toString()
},
markdownMessage: baseMessage,
severity: "warning",
severity: skipUnsupportedTracedAnalysis ? "error" : "warning",
visibility: {
cliSummaryTable: true,
statusPage: true,
@@ -186132,6 +186139,11 @@ async function isSwiftCompatible(action, config, codeql) {
}
)
);
if (skipUnsupportedTracedAnalysis) {
throw new ConfigurationError(baseMessage);
} else {
action.logger.warning(baseMessage);
}
}
}
@@ -186649,7 +186661,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,