Add check for id property when running variant analysis

This commit is contained in:
Koen Vlaswinkel
2024-02-28 11:17:15 +01:00
parent eb71df84a7
commit 5521c00346

View File

@@ -327,6 +327,17 @@ export class VariantAnalysisManager
);
}
// It's not possible to interpret a BQRS file to SARIF without an id property.
if (
queryMetadata?.kind &&
["problem", "path-problem"].includes(queryMetadata.kind) &&
!queryMetadata.id
) {
throw new UserCancellationException(
`${firstQueryFile} does not have the required @id property for a ${queryMetadata.kind} query.`,
);
}
const {
actionBranch,
base64Pack,