Skip to content

Commit

Permalink
Simplify validation report invocation
Browse files Browse the repository at this point in the history
  • Loading branch information
ktakashi committed Nov 10, 2023
1 parent e5d9932 commit edd685f
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions sitelib/text/json/schema/validators.scm
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,9 @@
(define lint-mode? (*json-schema:lint-mode?*))
(define ctx (make-validator-context lint-mode?))
(let ((r (validator v ctx)))
(or (and lint-mode?
(cond ((*json-schema:validator-error-reporter*) =>
(lambda (reporter) (reporter ctx) r))
(else r)))
r))))
(cond ((*json-schema:validator-error-reporter*) =>
(lambda (reporter) (reporter ctx))))
r)))

(define (simple-json-schema-error-reporter ctx)
(define out (or (*json-schema:report-port*) (current-error-port)))
Expand Down

0 comments on commit edd685f

Please sign in to comment.