From 3da973862d42c4bb73cb9e05594860439be4a462 Mon Sep 17 00:00:00 2001 From: "Michael B. Gale" Date: Thu, 29 Oct 2026 16:35:49 +0000 Subject: [PATCH] Add debug-level log messages when checks are skipped --- lib/entry-points.js | 15 +++++++++++++++ src/languages/traced.ts | 15 +++++++++++++++ 2 files changed, 30 insertions(+) diff --git a/lib/entry-points.js b/lib/entry-points.js index 7b3d3d064..f90431684 100644 --- a/lib/entry-points.js +++ b/lib/entry-points.js @@ -193980,19 +193980,34 @@ async function checkRunnerSupportsTracedAnalysis(action, config, codeql) { const version = darwinVersion(action); await checkSwiftCompatibility(config, codeql, version); if (!await action.features.getValue("check_unsupported_traced_analysis" /* CheckUnsupportedTracedAnalysis */)) { + action.logger.debug( + "Skipping traced analysis compatibility checks because the feature is not enabled." + ); return; } if (isSelfHostedRunner(action.env)) { + action.logger.debug( + "Skipping traced analysis compatibility checks because we are on a self-hosted runner." + ); return; } if (config.buildMode !== void 0 && config.buildMode === "none") { + action.logger.debug( + "Skipping traced analysis compatibility checks because the build mode is 'none'." + ); return; } if (version === void 0) { + action.logger.debug( + "Skipping traced analysis compatibility checks because we are not on macOS." + ); return; } const tracedLanguages = await hasTracedLanguages(config, codeql); if (tracedLanguages.length === 0) { + action.logger.debug( + "Skipping traced analysis compatibility checks because no traced languages are being analyzed." + ); return; } const skipUnsupportedTracedAnalysis = await action.features.getValue( diff --git a/src/languages/traced.ts b/src/languages/traced.ts index a1c69a56b..202252fb1 100644 --- a/src/languages/traced.ts +++ b/src/languages/traced.ts @@ -130,27 +130,42 @@ export async function checkRunnerSupportsTracedAnalysis( if ( !(await action.features.getValue(Feature.CheckUnsupportedTracedAnalysis)) ) { + action.logger.debug( + "Skipping traced analysis compatibility checks because the feature is not enabled.", + ); return; } // Skip if we are on a self-hosted runner. if (isSelfHostedRunner(action.env)) { + action.logger.debug( + "Skipping traced analysis compatibility checks because we are on a self-hosted runner.", + ); return; } // `build-mode: none` doesn't use the tracer, so it is always supported. if (config.buildMode !== undefined && config.buildMode === "none") { + action.logger.debug( + "Skipping traced analysis compatibility checks because the build mode is 'none'.", + ); return; } // These checks don't apply if we are not on macOS. if (version === undefined) { + action.logger.debug( + "Skipping traced analysis compatibility checks because we are not on macOS.", + ); return; } // If none of the languages are traced, then we can skip the compatibility checks below as well. const tracedLanguages = await hasTracedLanguages(config, codeql); if (tracedLanguages.length === 0) { + action.logger.debug( + "Skipping traced analysis compatibility checks because no traced languages are being analyzed.", + ); return; }