bids-standard / legacy-validator

Validator for the Brain Imaging Data Structure
https://bids-standard.github.io/legacy-validator/
MIT License
186 stars 111 forks source link

rf(json-schema): Factor JSON schema validation out of context.dataset #2033

Closed effigies closed 4 months ago

effigies commented 4 months ago

Follow-up to #2020. Feels a bit cleaner to make the Ajv validator a singleton that gets updated once, when the schema is loaded.

codecov[bot] commented 4 months ago

Codecov Report

Attention: Patch coverage is 67.64706% with 11 lines in your changes missing coverage. Please review.

Project coverage is 87.09%. Comparing base (f4de42a) to head (cc2e890).

Files Patch % Lines
bids-validator/src/validators/json.ts 56.52% 10 Missing :warning:
bids-validator/src/setup/loadSchema.ts 83.33% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #2033 +/- ## ========================================== + Coverage 85.75% 87.09% +1.33% ========================================== Files 91 134 +43 Lines 3785 6415 +2630 Branches 1218 1545 +327 ========================================== + Hits 3246 5587 +2341 - Misses 453 738 +285 - Partials 86 90 +4 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.