Skip to content

Commit 07bdb87

Browse files
committed
filterAlertsByDiffRange: add debug logging
1 parent f1edd39 commit 07bdb87

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/upload-lib.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -578,7 +578,7 @@ export async function uploadFiles(
578578
features,
579579
logger,
580580
);
581-
sarif = filterAlertsByDiffRange(sarif);
581+
sarif = filterAlertsByDiffRange(sarif, logger);
582582
sarif = await fingerprints.addFingerprints(sarif, checkoutPath, logger);
583583

584584
const analysisKey = await api.getAnalysisKey();
@@ -850,7 +850,7 @@ export class InvalidSarifUploadError extends Error {
850850
}
851851
}
852852

853-
function filterAlertsByDiffRange(sarif: SarifFile): SarifFile {
853+
function filterAlertsByDiffRange(sarif: SarifFile, logger: Logger): SarifFile {
854854
const diffRangeFilePath = path.join(
855855
actionsUtil.getTemporaryDirectory(),
856856
"pr-diff-range",
@@ -886,6 +886,7 @@ function filterAlertsByDiffRange(sarif: SarifFile): SarifFile {
886886
return false;
887887
}
888888
const locationPath = path.join(checkoutPath, uri);
889+
logger.debug(`Alert location URI: ${uri}, Path: ${locationPath}`);
889890
return diffRanges.some(
890891
(range) =>
891892
range.path === locationPath &&

0 commit comments

Comments
 (0)