Skip to content

Translate to RBS/RBI using multiline syntax when over --max-line-length #761

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jun 12, 2025

Conversation

Morriar
Copy link
Collaborator

@Morriar Morriar commented Jun 11, 2025

So long signatures such as this one:

sig do
  params(
    param1: AVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongType,
    param2: AVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongType
  ).void
end
def foo(param1:, param2:); end

get properly translated using the multiline syntax:

#: (
#|   param1: AVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongType,
#|   param2: AVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryVeryLongType
#| ) -> void
def foo(param1:, param2:); end

works for both

spoom srb sigs translate --from rbi --to rbs --max-line-length 120

and

spoom srb sigs translate --from rbs --to rbi --max-line-length 120

Clothes #753.

@Morriar Morriar requested a review from a team as a code owner June 11, 2025 15:08
@Morriar Morriar self-assigned this Jun 11, 2025
@Morriar Morriar added the feature New feature label Jun 11, 2025
Morriar added 5 commits June 11, 2025 11:10
Signed-off-by: Alexandre Terrasa <alexandre.terrasa@shopify.com>
Signed-off-by: Alexandre Terrasa <alexandre.terrasa@shopify.com>
Signed-off-by: Alexandre Terrasa <alexandre.terrasa@shopify.com>
Signed-off-by: Alexandre Terrasa <alexandre.terrasa@shopify.com>
Signed-off-by: Alexandre Terrasa <alexandre.terrasa@shopify.com>
@Morriar Morriar force-pushed the at-rbs-multiline branch from 4212976 to 46225f7 Compare June 11, 2025 15:10
@Morriar Morriar merged commit 8926c14 into main Jun 12, 2025
8 checks passed
@Morriar Morriar deleted the at-rbs-multiline branch June 12, 2025 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants