Refactor swift check out of init-action.ts

This commit is contained in:
Michael B. Gale
2026-10-09 11:01:20 +01:00
parent ed72893659
commit 788a22022b
4 changed files with 165 additions and 94 deletions

View File

@@ -56,6 +56,7 @@ import {
runDatabaseInitCluster,
} from "./init";
import { JavaEnvVars, BuiltInLanguage } from "./languages";
import { isSwiftCompatible } from "./languages/swift";
import { Logger, withGroupAsync } from "./logging";
import {
downloadOverlayBaseDatabaseFromCache,
@@ -418,14 +419,7 @@ async function run(
logger,
});
if (
config.languages.includes(BuiltInLanguage.swift) &&
process.platform !== "darwin"
) {
throw new ConfigurationError(
`Swift analysis is only supported on macOS runner images. Please migrate to a macOS runner.`,
);
}
isSwiftCompatible(actionState, config);
if (repositoryPropertiesResult.isFailure()) {
addNoLanguageDiagnostic(