Skip to content

lint: add conflicting_readonly_writeonly rule#817

Merged
jviotti merged 1 commit into
sourcemeta:mainfrom
AcEKaycgR:feat/linter-conflicting_readonly_writeonly
May 18, 2026
Merged

lint: add conflicting_readonly_writeonly rule#817
jviotti merged 1 commit into
sourcemeta:mainfrom
AcEKaycgR:feat/linter-conflicting_readonly_writeonly

Conversation

@AcEKaycgR
Copy link
Copy Markdown
Contributor

Summary

Adds a new lint rule conflicting_readonly_writeonly that fires when a schema
has both readOnly: true and writeOnly: true set. These keywords are
mutually exclusive.

Applies to Draft 7, 2019-09, and 2020-12.

Changes

  • src/alterschema/linter/conflicting_readonly_writeonly.h - new rule
  • src/alterschema/alterschema.cc - rule registered for all three dialects
  • src/alterschema/CMakeLists.txt - header added
  • test/alterschema/alterschema_lint_draft7_test.cc - tests added
  • test/alterschema/alterschema_lint_2019_09_test.cc - tests added
  • test/alterschema/alterschema_lint_2020_12_test.cc - tests added

Part of sourcemeta/core#1975.

Copy link
Copy Markdown

@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 6 files

Re-trigger cubic

Signed-off-by: AcE <kintan0108@gmail.com>
@AcEKaycgR AcEKaycgR force-pushed the feat/linter-conflicting_readonly_writeonly branch from 5d07f69 to 3265388 Compare May 18, 2026 06:32
Copy link
Copy Markdown
Member

@jviotti jviotti left a comment

Choose a reason for hiding this comment

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

Super! Impeccable PR! thanks!

@jviotti jviotti merged commit bf77f60 into sourcemeta:main May 18, 2026
14 checks passed
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.

2 participants