diff --git a/lib/upload-lib.js b/lib/upload-lib.js index 625eb06f8..b7f23ef73 100644 --- a/lib/upload-lib.js +++ b/lib/upload-lib.js @@ -92466,6 +92466,11 @@ async function getGroupedSarifFilePaths(logger, sarifPath) { logger.debug(`Found no SARIF files for ${analysisConfig.name}`); } } + if (sarifFiles.length !== 0) { + logger.warning( + `Found files in ${sarifPath} which do not belong to any analysis: ${sarifFiles.join(", ")}` + ); + } } else { for (const analysisConfig of SarifScanOrder) { if (analysisConfig.kind === "code-scanning" /* CodeScanning */ || analysisConfig.sarifPredicate(sarifPath)) { diff --git a/lib/upload-sarif-action.js b/lib/upload-sarif-action.js index 6dc87a291..1efe395bb 100644 --- a/lib/upload-sarif-action.js +++ b/lib/upload-sarif-action.js @@ -93116,6 +93116,11 @@ async function getGroupedSarifFilePaths(logger, sarifPath) { logger.debug(`Found no SARIF files for ${analysisConfig.name}`); } } + if (sarifFiles.length !== 0) { + logger.warning( + `Found files in ${sarifPath} which do not belong to any analysis: ${sarifFiles.join(", ")}` + ); + } } else { for (const analysisConfig of SarifScanOrder) { if (analysisConfig.kind === "code-scanning" /* CodeScanning */ || analysisConfig.sarifPredicate(sarifPath)) { diff --git a/src/upload-lib.ts b/src/upload-lib.ts index 9566eeb9d..c715a2063 100644 --- a/src/upload-lib.ts +++ b/src/upload-lib.ts @@ -503,6 +503,12 @@ export async function getGroupedSarifFilePaths( logger.debug(`Found no SARIF files for ${analysisConfig.name}`); } } + + if (sarifFiles.length !== 0) { + logger.warning( + `Found files in ${sarifPath} which do not belong to any analysis: ${sarifFiles.join(", ")}`, + ); + } } else { for (const analysisConfig of analyses.SarifScanOrder) { if (