Skip to content

Allow disabling rules in-place using a x-lint-exclude keyword#626

Merged
jviotti merged 1 commit intomainfrom
exclude-keyword-lint
Jan 23, 2026
Merged

Allow disabling rules in-place using a x-lint-exclude keyword#626
jviotti merged 1 commit intomainfrom
exclude-keyword-lint

Conversation

@jviotti
Copy link
Member

@jviotti jviotti commented Jan 23, 2026

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

Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
@jviotti jviotti force-pushed the exclude-keyword-lint branch from 1266df9 to 135922f Compare January 23, 2026 16:08
@augmentcode
Copy link

augmentcode bot commented Jan 23, 2026

🤖 Augment PR Summary

Summary: This PR adds support for excluding individual lint rules directly inside a JSON Schema using an x-lint-exclude extension keyword.

Changes:

  • Documented the new x-lint-exclude mechanism (string or array of rule names) in docs/lint.markdown
  • Updated the lint command to pass an exclude-keyword identifier into the schema transformer during rule evaluation
  • Extended the vendored core schema transformer API so rule evaluation can honor per-subschema exclusions
  • Enhanced the JSON utility API to support efficient array-of-strings membership checks used by exclusions
  • Added test coverage for single-string and array exclusions, including behavior under --fix and partial exclusions

Technical Notes: Rule exclusion is applied at rule-check time (per subschema), based on the presence of x-lint-exclude matching the rule name, without requiring global CLI excludes.

🤖 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. No suggestions at this time.

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

@jviotti jviotti merged commit 689f5f6 into main Jan 23, 2026
12 of 13 checks passed
@jviotti jviotti deleted the exclude-keyword-lint branch January 23, 2026 16:20
tmeijn pushed a commit to tmeijn/dotfiles that referenced this pull request Jan 27, 2026
This MR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [sourcemeta/jsonschema](https://github.com/sourcemeta/jsonschema) | minor | `v14.2.0` → `v14.4.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>

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

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

#### What's Changed

- Allow disabling rules in-place using a `x-lint-exclude` keyword by [@&#8203;jviotti](https://github.com/jviotti) in [#&#8203;626](sourcemeta/jsonschema#626)

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

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

[Compare Source](sourcemeta/jsonschema@v14.2.0...v14.3.0)

#### What's Changed

- Make sure `lint` gracefully fails given invalid schemas by [@&#8203;jviotti](https://github.com/jviotti) in [#&#8203;621](sourcemeta/jsonschema#621)
- Better handle invalid schemas in all commands by [@&#8203;jviotti](https://github.com/jviotti) in [#&#8203;622](sourcemeta/jsonschema#622)
- Move some overly verbose logs from `--verbose` into a new `--debug` option by [@&#8203;jviotti](https://github.com/jviotti) in [#&#8203;623](sourcemeta/jsonschema#623)
- Improve error output on invalid `$ref` targets by [@&#8203;jviotti](https://github.com/jviotti) in [#&#8203;625](sourcemeta/jsonschema#625)

**Full Changelog**: <sourcemeta/jsonschema@v14.2.0...v14.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:eyJjcmVhdGVkSW5WZXIiOiI0Mi45MC4wIiwidXBkYXRlZEluVmVyIjoiNDIuOTAuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiUmVub3ZhdGUgQm90IiwiYXV0b21hdGlvbjpib3QtYXV0aG9yZWQiLCJkZXBlbmRlbmN5LXR5cGU6Om1pbm9yIl19-->
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.

1 participant