Skip to content

Commit

Permalink
check type precondition
Browse files Browse the repository at this point in the history
  • Loading branch information
giacomociti committed Feb 8, 2024
1 parent 3972ec1 commit 61728b4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/shacl/report.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ async function * validate(ds, maxViolations, iterable) {
const validator = new SHACLValidator(ds, { maxErrors: 0, factory: this.env })
const report = validator.validate(chunk)
if (!report.conforms) {
report.results.forEach(r => counter.add(r.severity))
for (const result of report.results) {
if (result.severity) counter.add(result.severity)
}

totalViolations = counter.termMap.get(this.env.ns.sh.Violation) ?? 0
yield report.dataset
}
Expand Down

0 comments on commit 61728b4

Please sign in to comment.