Skip to content

Improve invalid pattern regex error messages and a regex bug#679

Merged
jviotti merged 2 commits intomainfrom
better-regex-error
Mar 5, 2026
Merged

Improve invalid pattern regex error messages and a regex bug#679
jviotti merged 2 commits intomainfrom
better-regex-error

Conversation

@jviotti
Copy link
Member

@jviotti jviotti commented Mar 5, 2026

Fixes: #678
Signed-off-by: Juan Cruz Viotti jv@jviotti.com

Copy link

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 64 files

Fixes: #678
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
@jviotti jviotti force-pushed the better-regex-error branch from 9b9f412 to 3903f2f Compare March 5, 2026 20:49
@augmentcode
Copy link

augmentcode bot commented Mar 5, 2026

🤖 Augment PR Summary

Summary: Improves CLI diagnostics when schemas contain invalid regular expressions (e.g., invalid JSON Schema pattern), addressing issue #678.

Changes:

  • Introduced dedicated Blaze exceptions for invalid regex compilation and invalid linter rule name patterns (CompilerInvalidRegexError, LinterInvalidNamePatternError).
  • Wrapped these new errors in CLI commands (compile, validate, metaschema, lint) so they are reported with file context.
  • Extended CLI error rendering to emit the failing regex value (both text and JSON output) and added a targeted validate regression test.

Technical Notes: Vendor updates also include a Blaze evaluator dispatch refactor and several Core library changes (new preprocessor/forceinline utilities, URI template router view hardening, and additional I/O helpers).

🤖 Was this summary useful? React with 👍 or 👎

Copy link

@augmentcode augmentcode bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review completed. 1 suggestions posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
@jviotti jviotti force-pushed the better-regex-error branch from e4ed6dd to cc4714f Compare March 5, 2026 20:59
@jviotti jviotti changed the title Improve invalid pattern regex error messages Improve invalid pattern regex error messages and a regex bug Mar 5, 2026
@jviotti jviotti merged commit 3f36105 into main Mar 5, 2026
11 of 13 checks passed
@jviotti jviotti deleted the better-regex-error branch March 5, 2026 21:12
tmeijn pushed a commit to tmeijn/dotfiles that referenced this pull request Mar 11, 2026
This MR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [sourcemeta/jsonschema](https://github.com/sourcemeta/jsonschema) | minor | `v14.13.4` → `v14.14.2` |

MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot).

**Proposed changes to behavior should be submitted there as MRs.**

---

### Release Notes

<details>
<summary>sourcemeta/jsonschema (sourcemeta/jsonschema)</summary>

### [`v14.14.2`](https://github.com/sourcemeta/jsonschema/releases/tag/v14.14.2)

[Compare Source](sourcemeta/jsonschema@v14.14.1...v14.14.2)

#### What's Changed

- Fix a false negative case of `required_properties_in_properties` in `lint` by [@&#8203;jviotti](https://github.com/jviotti) in [#&#8203;681](sourcemeta/jsonschema#681)

**Full Changelog**: <sourcemeta/jsonschema@v14.14.1...v14.14.2>

### [`v14.14.1`](https://github.com/sourcemeta/jsonschema/releases/tag/v14.14.1)

[Compare Source](sourcemeta/jsonschema@v14.14.0...v14.14.1)

#### What's Changed

- Fix NPM tests by [@&#8203;jviotti](https://github.com/jviotti) in [#&#8203;680](sourcemeta/jsonschema#680)

**Full Changelog**: <sourcemeta/jsonschema@v14.14.0...v14.14.1>

### [`v14.14.0`](https://github.com/sourcemeta/jsonschema/releases/tag/v14.14.0)

[Compare Source](sourcemeta/jsonschema@v14.13.4...v14.14.0)

#### What's Changed

- Better distinguish error categories using different exit codes by [@&#8203;RitoG09](https://github.com/RitoG09) in [#&#8203;648](sourcemeta/jsonschema#648)
- Run a real FUSE test on CI on Linux by [@&#8203;jviotti](https://github.com/jviotti) in [#&#8203;652](sourcemeta/jsonschema#652)
- Improve invalid `pattern` regex error messages and a regex bug by [@&#8203;jviotti](https://github.com/jviotti) in [#&#8203;679](sourcemeta/jsonschema#679)

#### New Contributors

- [@&#8203;RitoG09](https://github.com/RitoG09) made their first contribution in [#&#8203;648](sourcemeta/jsonschema#648)

**Full Changelog**: <sourcemeta/jsonschema@v14.13.4...v14.14.0>

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this MR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box

---

This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My41NS4zIiwidXBkYXRlZEluVmVyIjoiNDMuNTcuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiUmVub3ZhdGUgQm90IiwiYXV0b21hdGlvbjpib3QtYXV0aG9yZWQiLCJkZXBlbmRlbmN5LXR5cGU6Om1pbm9yIl19-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

jsonschema flags invalid regular expression

1 participant