python-jsonschema / check-jsonschema

A CLI and set of pre-commit hooks for jsonschema validation with built-in support for GitHub Workflows, Renovate, Azure Pipelines, and more!
https://check-jsonschema.readthedocs.io/en/stable
Other
192 stars 38 forks source link

Use regress and remove 'disabled' regex format #306

Closed sirosen closed 10 months ago

sirosen commented 10 months ago

The default regex check mode gets a significant upgrade here to support ECMAScript standard regexes via the 'regress' package and underlying crate. This should now fully validate regexes in many more scenarios, rather than doing a best-effort check.

Since this is a change which touches regex behavior in a significant way, the opportunity is also taken to remove support for --format-regex disabled. Users should be converted to the --disable-formats flag, which supports this via --disable-formats regex.

Tests are given mild updates to drop the disabled value for that flag, but use --disable-formats regex instead. And the implementation is very mildly refactored to hopefully support plugging the regress implementation into more of jsonschema in the future.