Skip to content

Conversation

@jviotti
Copy link
Member

@jviotti jviotti commented Dec 21, 2025

Fixes: #536
Signed-off-by: Juan Cruz Viotti [email protected]

@jviotti jviotti force-pushed the linter-improvements branch from 7f9da8c to c3b4227 Compare December 23, 2025 13:20
@jviotti jviotti marked this pull request as ready for review December 23, 2025 13:30
@augmentcode
Copy link

augmentcode bot commented Dec 23, 2025

🤖 Augment PR Summary

Summary: This PR expands the schema linter/canonicalizer capabilities and improves schema framing to support new rules (Fixes #536).

Changes:

  • Renames alter-schema modes to Linter/Canonicalizer and updates CLI entrypoints accordingly.
  • Reorganizes alter-schema rules, introducing a shared common/ rule set used across modes.
  • Adds new rules such as orphan_definitions, drop_allof_empty_schemas, and unnecessary_allof_wrapper, and extends canonicalization with no_metadata and generalized type_array_to_any_of.
  • Updates SchemaFrame instance-location computation (multi-pass reference/inheritance tracing) to better attribute origins through reference chains.
  • Refactors SchemaTransformer to preserve rule evaluation order via a vector (and adjusts iteration/removal accordingly).
  • Improves type handling by changing parse_schema_type to accept JSON values (string/array) and return a TypeSet.
  • Enhances JSON pointer template support (stringification, hashing, convenience constructors).
  • Updates Blaze compiler/evaluator keyword reporting for boolean schemas inside applicators.
  • Adjusts canonicalize/lint tests and rule-list counts to reflect the new behaviors.
  • Bumps vendored dependency SHAs (core/jsonbinpack/blaze) to pick up the new APIs/features.
Technical Notes: The new orphan-definition detection depends on accurate instance-location propagation through references, hence the SchemaFrame/transformer plumbing changes.

🤖 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.

@jviotti jviotti merged commit 39a92f2 into main Dec 23, 2025
12 checks passed
@jviotti jviotti deleted the linter-improvements branch December 23, 2025 13:36
tmeijn pushed a commit to tmeijn/dotfiles that referenced this pull request Jan 5, 2026
This MR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [sourcemeta/jsonschema](https://github.com/sourcemeta/jsonschema) | minor | `v13.2.1` → `v13.6.0` |

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>

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

[Compare Source](sourcemeta/jsonschema@v13.5.0...v13.6.0)

#### What's Changed

- Emit CTRF output on `test` when `--json` is passed by [@&#8203;jviotti](https://github.com/jviotti) in [#&#8203;593](sourcemeta/jsonschema#593)
- Disable `orphan_definitions` for now by [@&#8203;jviotti](https://github.com/jviotti) in [#&#8203;594](sourcemeta/jsonschema#594)

**Full Changelog**: <sourcemeta/jsonschema@v13.5.0...v13.6.0>

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

[Compare Source](sourcemeta/jsonschema@v13.4.0...v13.5.0)

#### What's Changed

- Fix minor shell auto-completion mismatches by [@&#8203;jviotti](https://github.com/jviotti) in [#&#8203;587](sourcemeta/jsonschema#587)
- Lint property names that are not code-generation friendly by [@&#8203;jviotti](https://github.com/jviotti) in [#&#8203;588](sourcemeta/jsonschema#588)

**Full Changelog**: <sourcemeta/jsonschema@v13.4.0...v13.5.0>

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

[Compare Source](sourcemeta/jsonschema@v13.3.0...v13.4.0)

#### What's Changed

- Add various linter and canonicalizer new rules by [@&#8203;jviotti](https://github.com/jviotti) in [#&#8203;586](sourcemeta/jsonschema#586)

**Full Changelog**: <sourcemeta/jsonschema@v13.3.0...v13.4.0>

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

[Compare Source](sourcemeta/jsonschema@v13.2.1...v13.3.0)

#### What's Changed

- Implement a `canonicalize` command by [@&#8203;jviotti](https://github.com/jviotti) in [#&#8203;585](sourcemeta/jsonschema#585)

**Full Changelog**: <sourcemeta/jsonschema@v13.2.1...v13.3.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:eyJjcmVhdGVkSW5WZXIiOiI0Mi42NC4xIiwidXBkYXRlZEluVmVyIjoiNDIuNjYuOCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiUmVub3ZhdGUgQm90IiwiYXV0b21hdGlvbjpib3QtYXV0aG9yZWQiLCJkZXBlbmRlbmN5LXR5cGU6Om1pbm9yIl19-->
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.

lint --fix creates an unconstrained subschema in allOf

2 participants