Fail if no SARIF files were uploaded

This commit is contained in:
Michael B. Gale
2025-09-29 09:04:44 +01:00
parent 2adc894410
commit 5fd2cfe1ef
2 changed files with 13 additions and 0 deletions
+8
View File
@@ -97,6 +97,14 @@ async function run() {
sarifPath,
category,
);
// Fail if we didn't upload anything.
if (Object.keys(uploadResults).length === 0) {
throw new ConfigurationError(
`No SARIF files found to upload in "${sarifPath}".`,
);
}
const codeScanningResult =
uploadResults[analyses.AnalysisKind.CodeScanning];
if (codeScanningResult !== undefined) {