Skip to content

Add force option to RBS comment translation - #1000

Merged
Morriar merged 2 commits into
mainfrom
at/rbs-comments-force
Aug 20, 2026
Merged

Add force option to RBS comment translation#1000
Morriar merged 2 commits into
mainfrom
at/rbs-comments-force

Conversation

@Morriar

@Morriar Morriar commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Why?

rbs_comments_to_sorbet_sigs currently skips files without a valid Sorbet sigil, even when they contain RBS comments. Some callers need to translate those files explicitly (see https://github.com/Shopify/rubocop-sorbet/pull/397/changes#diff-6ba746ed3dcb37240ffd44cd598c2d3422c91bdadd54c8d2b8dcaf30c92006f0R188-R201).

What changed?

Added an optional force: argument to rbs_comments_to_sorbet_sigs.

When enabled, RBS comments are translated without requiring a valid # typed: sigil. The source must still contain supported RBS syntax, and the default behavior remains unchanged.

This option is limited to the Ruby API; CLI behavior is unchanged.

@Morriar
Morriar requested a review from a team as a code owner August 6, 2026 17:32
@Morriar
Morriar force-pushed the at/rbs-comments-force branch from 54a0223 to ea9cf09 Compare August 6, 2026 17:33
@Morriar Morriar closed this Aug 7, 2026
@Morriar Morriar reopened this Aug 7, 2026

@dejmedus dejmedus left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM:)

@Morriar
Morriar force-pushed the at/rbs-comments-force branch from ea9cf09 to e286ace Compare August 11, 2026 14:23
Comment thread lib/spoom/sorbet/translate/rbs_comments_to_sorbet_sigs.rb
@Morriar
Morriar merged commit f3d9cd8 into main Aug 20, 2026
11 checks passed
@Morriar
Morriar deleted the at/rbs-comments-force branch August 20, 2026 13:12
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.

3 participants