Merge pull request #1668 from github/aeisenberg/update-sarif-schema
This commit is contained in:
commit
11fba50273
16 changed files with 683 additions and 221 deletions
2
lib/upload-lib.js
generated
2
lib/upload-lib.js
generated
|
|
@ -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
Loading…
Add table
Add a link
Reference in a new issue