mirror of
https://github.com/github/codeql-action.git
synced 2026-11-05 04:29:40 +00:00
Combine product name and version into ProductVersion type
This commit is contained in:
9
lib/entry-points.js
generated
9
lib/entry-points.js
generated
@@ -194018,7 +194018,8 @@ async function checkSwiftCompatibility(config, codeql, darwinVersion2) {
|
||||
// src/languages/traced.ts
|
||||
var UNSUPPORTED_DARWIN_FOR_TRACED = 27;
|
||||
var UNSUPPORTED_XCODE_FOR_TRACED = 27;
|
||||
function handleUnsupportedVersion(logger2, config, tracedLanguages, abortUnsupportedTracedAnalysis, product, version) {
|
||||
function handleUnsupportedVersion(logger2, config, tracedLanguages, abortUnsupportedTracedAnalysis, productVersion) {
|
||||
const { product, version } = productVersion;
|
||||
const unsupportedVersion = product === "macOS" ? UNSUPPORTED_DARWIN_FOR_TRACED : UNSUPPORTED_XCODE_FOR_TRACED;
|
||||
const baseMessage = [
|
||||
`Traced analysis is not supported on ${product} ${unsupportedVersion} or above.`,
|
||||
@@ -194112,8 +194113,7 @@ async function checkRunnerSupportsTracedAnalysis(action, config, codeql) {
|
||||
config,
|
||||
tracedLanguages,
|
||||
abortUnsupportedTracedAnalysis,
|
||||
"macOS",
|
||||
version
|
||||
{ product: "macOS", version }
|
||||
);
|
||||
return;
|
||||
}
|
||||
@@ -194124,8 +194124,7 @@ async function checkRunnerSupportsTracedAnalysis(action, config, codeql) {
|
||||
config,
|
||||
tracedLanguages,
|
||||
abortUnsupportedTracedAnalysis,
|
||||
"Xcode",
|
||||
xcodeVer
|
||||
{ product: "Xcode", version: xcodeVer }
|
||||
);
|
||||
} else if (xcodeVer === void 0) {
|
||||
action.logger.info(
|
||||
|
||||
@@ -22,6 +22,12 @@ export const UNSUPPORTED_DARWIN_FOR_TRACED = 27;
|
||||
/** Xcode 27 and above do not support traced extraction. */
|
||||
export const UNSUPPORTED_XCODE_FOR_TRACED = 27;
|
||||
|
||||
/** A version along with the product it relates to. */
|
||||
type ProductVersion = {
|
||||
product: "macOS" | "Xcode";
|
||||
version: semver.SemVer;
|
||||
};
|
||||
|
||||
/**
|
||||
* Creates a diagnostic indicating that `version` of `product` is unsupported for traced analysis.
|
||||
* Depending on `skipUnsupportedTracedAnalysis`, this function then either throws a {@link ConfigurationError}
|
||||
@@ -31,17 +37,16 @@ export const UNSUPPORTED_XCODE_FOR_TRACED = 27;
|
||||
* @param config The CodeQL Action configuration.
|
||||
* @param tracedLanguages Traced languages that are configured for analysis.
|
||||
* @param abortUnsupportedTracedAnalysis Whether this is a fatal error.
|
||||
* @param product The product that the version is unsupported of.
|
||||
* @param version The unsupported version.
|
||||
* @param productVersion A description of the product and its version that is unsupported.
|
||||
*/
|
||||
function handleUnsupportedVersion(
|
||||
logger: Logger,
|
||||
config: ActionConfig<"dbLocation" | "tempDir">,
|
||||
tracedLanguages: string[],
|
||||
abortUnsupportedTracedAnalysis: boolean,
|
||||
product: "macOS" | "Xcode",
|
||||
version: semver.SemVer,
|
||||
productVersion: ProductVersion,
|
||||
) {
|
||||
const { product, version } = productVersion;
|
||||
const unsupportedVersion =
|
||||
product === "macOS"
|
||||
? UNSUPPORTED_DARWIN_FOR_TRACED
|
||||
@@ -181,8 +186,7 @@ export async function checkRunnerSupportsTracedAnalysis(
|
||||
config,
|
||||
tracedLanguages,
|
||||
abortUnsupportedTracedAnalysis,
|
||||
"macOS",
|
||||
version,
|
||||
{ product: "macOS", version },
|
||||
);
|
||||
|
||||
// Return early so that we don't end up producing more-or-less the same log message/diagnostic
|
||||
@@ -209,8 +213,7 @@ export async function checkRunnerSupportsTracedAnalysis(
|
||||
config,
|
||||
tracedLanguages,
|
||||
abortUnsupportedTracedAnalysis,
|
||||
"Xcode",
|
||||
xcodeVer,
|
||||
{ product: "Xcode", version: xcodeVer },
|
||||
);
|
||||
} else if (xcodeVer === undefined) {
|
||||
action.logger.info(
|
||||
|
||||
Reference in New Issue
Block a user