Skip to content
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

Add autocorrect when sig is missing argument from method def #5233

Open
jez opened this issue Feb 3, 2022 · 0 comments
Open

Add autocorrect when sig is missing argument from method def #5233

jez opened this issue Feb 3, 2022 · 0 comments
Labels
enhancement New feature or surprising current feature good first issue Good for newcomers
Milestone

Comments

@jez
Copy link
Collaborator

jez commented Feb 3, 2022

Input

→ View on sorbet.run

# typed: true
extend T::Sig

sig {params(x: Integer).void}
def foo(x, y)
end

Observed output

editor.rb:5: Malformed sig. Type not specified for argument y https://srb.help/5003
     5 |def foo(x, y)
                   ^
    editor.rb:4: Signature
     4 |sig {params(x: Integer).void}
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Errors: 1

Expected behavior

The error is right, but we could make it better by offering an autocorrect to fix the sig.


@jez jez added bug Something isn't working good first issue Good for newcomers labels Feb 3, 2022
@jez jez added this to the Autocorrects milestone Feb 3, 2022
@jez jez added enhancement New feature or surprising current feature and removed bug Something isn't working labels Aug 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or surprising current feature good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant