Repository navigation
Expose RBS syntax and strictness helpers for rbs_rewriter - #1031
Merged
Merged
Conversation
st0012
force-pushed
the
codex/rbs-minimum-strictness
branch
from
October 12, 2026 19:24
b199267 to
a157ab3
Compare
st0012
marked this pull request as ready for review
October 13, 2026 09:21
Morriar
reviewed
Oct 13, 2026
| "# @overridable", | ||
| "# @without_runtime", | ||
| ]).freeze #: Regexp | ||
| private_constant :RBS_REWRITE_PATTERN |
Member
Author
There was a problem hiding this comment.
Yeah I didn't cut a release for it and this PR adopts @amomchilov's suggestion to create API methods instead.
Morriar
approved these changes
Oct 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
rbs_rewriterneeds separate checks for the sigil level and RBS syntax so it can count each skip reason. This addsSigils.satisfies_minimum_strictness?(content, strictness)andRBSCommentsToSorbetSigs.contains_rbs_syntax?(content).The RBS helper matches comment markers so callers can skip parsing files without RBS annotations. It does not validate syntax or check the sigil. The rewrite pattern becomes private, and the generated RBI exposes the two predicates.