Log numbered of PR diff-range filtered alerts

This commit is contained in:
Kasper Svendsen
2025-10-28 10:32:34 +01:00
parent d321539bd2
commit 8c8b134bbc
5 changed files with 16 additions and 0 deletions
+3
View File
@@ -96014,6 +96014,7 @@ function filterAlertsByDiffRange(logger, sarif) {
}
for (const run2 of sarif.runs) {
if (run2.results) {
const preAlertCount = run2.results.length;
run2.results = run2.results.filter((result) => {
const locations = [
...(result.locations || []).map((loc) => loc.physicalLocation),
@@ -96030,6 +96031,8 @@ function filterAlertsByDiffRange(logger, sarif) {
);
});
});
const postAlertCount = run2.results.length;
logger.info(`Filtered ${preAlertCount - postAlertCount} alerts based on diff range.`);
}
}
return sarif;
+3
View File
@@ -133526,6 +133526,7 @@ function filterAlertsByDiffRange(logger, sarif) {
}
for (const run2 of sarif.runs) {
if (run2.results) {
const preAlertCount = run2.results.length;
run2.results = run2.results.filter((result) => {
const locations = [
...(result.locations || []).map((loc) => loc.physicalLocation),
@@ -133542,6 +133543,8 @@ function filterAlertsByDiffRange(logger, sarif) {
);
});
});
const postAlertCount = run2.results.length;
logger.info(`Filtered ${preAlertCount - postAlertCount} alerts based on diff range.`);
}
}
return sarif;
+3
View File
@@ -92964,6 +92964,7 @@ function filterAlertsByDiffRange(logger, sarif) {
}
for (const run of sarif.runs) {
if (run.results) {
const preAlertCount = run.results.length;
run.results = run.results.filter((result) => {
const locations = [
...(result.locations || []).map((loc) => loc.physicalLocation),
@@ -92980,6 +92981,8 @@ function filterAlertsByDiffRange(logger, sarif) {
);
});
});
const postAlertCount = run.results.length;
logger.info(`Filtered ${preAlertCount - postAlertCount} alerts based on diff range.`);
}
}
return sarif;
+3
View File
@@ -93590,6 +93590,7 @@ function filterAlertsByDiffRange(logger, sarif) {
}
for (const run2 of sarif.runs) {
if (run2.results) {
const preAlertCount = run2.results.length;
run2.results = run2.results.filter((result) => {
const locations = [
...(result.locations || []).map((loc) => loc.physicalLocation),
@@ -93606,6 +93607,8 @@ function filterAlertsByDiffRange(logger, sarif) {
);
});
});
const postAlertCount = run2.results.length;
logger.info(`Filtered ${preAlertCount - postAlertCount} alerts based on diff range.`);
}
}
return sarif;
+4
View File
@@ -1142,6 +1142,7 @@ function filterAlertsByDiffRange(logger: Logger, sarif: SarifFile): SarifFile {
for (const run of sarif.runs) {
if (run.results) {
const preAlertCount = run.results.length;
run.results = run.results.filter((result) => {
const locations = [
...(result.locations || []).map((loc) => loc.physicalLocation),
@@ -1168,6 +1169,9 @@ function filterAlertsByDiffRange(logger: Logger, sarif: SarifFile): SarifFile {
);
});
});
const postAlertCount = run.results.length;
logger.info(`Filtered ${preAlertCount - postAlertCount} alerts based on diff range.`);
}
}