Print a warning when there are sarifFiles in getGroupedSarifFilePaths that don't belong to an analysis kind

This commit is contained in:
Michael B. Gale
2025-09-29 12:59:54 +01:00
parent 056fb86575
commit 93711d3d89
3 changed files with 16 additions and 0 deletions
+5
View File
@@ -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)) {
+5
View File
@@ -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)) {
+6
View File
@@ -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 (