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

Autocorrection support for Sorbet signatures #7

Merged
merged 2 commits into from
Mar 9, 2021

Conversation

jaredbeck
Copy link
Collaborator

@jaredbeck jaredbeck commented Mar 3, 2021

https://sorbet.org/docs/sigs

Input

class Foo
  # Comment b
  def b; end
  # Comment a
  sig { params(x: Integer).returns(String) }
  def a(x)
    x.to_s
  end
  alias_method :a2, :a
end

Output

class Foo
  # Comment a
  sig { params(x: Integer).returns(String) }
  def a(x)
    x.to_s
  end
  alias_method :a2, :a
  # Comment b
  def b; end
end

Fixes #3

@jaredbeck jaredbeck merged commit 1017d79 into shanecav84:master Mar 9, 2021
@jaredbeck jaredbeck deleted the sorbet branch March 9, 2021 21:12
@shanecav84
Copy link
Owner

Released in 0.9.

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.

Support for sorbet
2 participants