Conversation
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
There was a problem hiding this comment.
No issues found across 380 files
Note: This PR contains a large number of files. cubic only reviews up to 100 files per PR, so some files may not have been reviewed. cubic prioritizes the most important files to review.
On a pro plan you can use ultrareview for larger PRs.
Re-trigger cubic
🤖 Augment PR SummarySummary: This PR introduces a new linter rule, Changes:
Technical Notes: The new rule is a non-mutating lint check and is surfaced via the existing 🤖 Was this summary useful? React with 👍 or 👎 |
| using mutates = std::false_type; | ||
| using reframe_after_transform = std::false_type; | ||
| ConflictingReadOnlyWriteOnly() | ||
| : SchemaTransformRule{"conflicting_readonly_writeonly", |
There was a problem hiding this comment.
The rule description says readOnly and writeOnly are "mutually exclusive", but the condition only triggers when both are present and both are true; consider tightening the wording so users don’t interpret it as “they can’t both appear at all”.
Severity: low
🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.
| const sourcemeta::blaze::SchemaResolver &) const | ||
| -> SchemaTransformRule::Result override { | ||
| ONLY_CONTINUE_IF(vocabularies.contains_any( | ||
| {Vocabularies::Known::JSON_Schema_2020_12_Meta_Data, |
There was a problem hiding this comment.
handle_readOnly/handle_writeOnly in Blaze’s known walker recognizes these keywords for JSON_Schema_Draft_7_Hyper (and Draft 6 variants), but this rule’s vocabulary gate only includes JSON_Schema_Draft_7; if you intend to lint those dialects too, this condition will currently skip them.
Severity: medium
🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.
| const auto *write_only{schema.try_at("writeOnly")}; | ||
| ONLY_CONTINUE_IF(read_only && write_only); | ||
| ONLY_CONTINUE_IF(read_only->is_boolean() && write_only->is_boolean()); | ||
| ONLY_CONTINUE_IF(read_only->to_boolean() && write_only->to_boolean()); |
There was a problem hiding this comment.
There doesn’t seem to be a failing lint test case exercising this new rule (only the --list output was updated); adding a minimal schema with both readOnly and writeOnly set to true would help prevent regressions in rule triggering and message/locations.
Severity: low
🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.
Signed-off-by: Juan Cruz Viotti jv@jviotti.com