Skip to content

Commit 8a764ff

Browse files
authored
Include URL to announcement in diagnostic and log messages
1 parent 7480971 commit 8a764ff

3 files changed

Lines changed: 25 additions & 6 deletions

File tree

‎lib/entry-points.js‎

Lines changed: 10 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎src/doc-url.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,6 @@ export enum DocUrl {
1313
SPECIFY_BUILD_STEPS_MANUALLY = "https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages#about-specifying-build-steps-manually",
1414
SYSTEM_REQUIREMENTS = "https://codeql.github.com/docs/codeql-overview/system-requirements/",
1515
TRACK_CODE_SCANNING_ALERTS_ACROSS_RUNS = "https://docs.github.com/en/code-security/reference/code-scanning/sarif-support-for-code-scanning#data-for-preventing-duplicated-alerts",
16+
/** Blog post about traced analysis being unsupported on macOS 27 and with Xcode 27. */
17+
UNSUPPORTED_TRACED_ANALYSIS_MACOS27 = "https://github.blog/changelog/2026-10-19-codeql-changes-for-macos-27-xcode-27-and-swift-6-4/",
1618
}

‎src/languages/traced.ts‎

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import type { ActionState, Logger } from "../action-common";
44
import type { CodeQL } from "../codeql";
55
import type { ActionConfig } from "../config/action-config";
66
import { addDiagnostic, makeDiagnostic } from "../diagnostics";
7+
import { DocUrl } from "../doc-url";
78
import { Feature } from "../feature-flags";
89
import { macOSVersion, xcodeVersion } from "../platform";
910
import { ConfigurationError } from "../util";
@@ -55,7 +56,10 @@ function handleUnsupportedVersion(
5556
languages: config.languages,
5657
[attributeName]: version.toString(),
5758
},
58-
markdownMessage: baseMessage,
59+
markdownMessage: [
60+
baseMessage,
61+
`For more information, see [this announcement](${DocUrl.UNSUPPORTED_TRACED_ANALYSIS_MACOS27}).`,
62+
].join(" "),
5963
severity: skipUnsupportedTracedAnalysis ? "error" : "warning",
6064
visibility: {
6165
cliSummaryTable: true,
@@ -67,14 +71,20 @@ function handleUnsupportedVersion(
6771
);
6872
}
6973

74+
// Log messages generally don't render as markdown, so we include the URL verbatim there.
75+
const logMessage = [
76+
baseMessage,
77+
`For more information, see ${DocUrl.UNSUPPORTED_TRACED_ANALYSIS_MACOS27}`,
78+
].join(" ");
79+
7080
// Throw an error to abort the analysis if the FF is enabled or log the message.
7181
if (skipUnsupportedTracedAnalysis) {
7282
// ConfigurationErrors are converted to the "aborted" status by the exception handler
7383
// in `init-action.ts` that guards the call to `checkRunnerSupportsTracedAnalysis`.
74-
throw new ConfigurationError(baseMessage);
84+
throw new ConfigurationError(logMessage);
7585
} else {
7686
// This will also show up as a workflow annotation.
77-
logger.warning(baseMessage);
87+
logger.warning(logMessage);
7888
}
7989
}
8090

0 commit comments

Comments
 (0)