Merge pull request #1668 from github/aeisenberg/update-sarif-schema

This commit is contained in:
Andrew Eisenberg 2023-05-05 09:14:24 -07:00 committed by GitHub
commit 11fba50273
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 683 additions and 221 deletions

2
lib/upload-lib.js generated
View file

@ -179,7 +179,7 @@ exports.countResultsInSarif = countResultsInSarif;
// Throws an error if the file is invalid.
function validateSarifFileSchema(sarifFilePath, logger) {
const sarif = JSON.parse(fs.readFileSync(sarifFilePath, "utf8"));
const schema = require("../src/sarif_v2.1.0_schema.json");
const schema = require("../src/sarif-schema-2.1.0.json");
const result = new jsonschema.Validator().validate(sarif, schema);
if (!result.valid) {
// Output the more verbose error messages in groups as these may be very large.

File diff suppressed because one or more lines are too long