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

Fix comments parsing for RBI::Method #333

Merged
merged 1 commit into from
Aug 2, 2024
Merged

Conversation

Morriar
Copy link
Collaborator

@Morriar Morriar commented Jul 31, 2024

Before this PR, parsing a file such as this one:

# some comment
def foo(x); end

End up associating the comment to the x parameter:

def foo(
  x, # some comment
); end

This PR fixes the way we associate the comment to the method so the result is accurate:

# some comment
def foo(x); end

@Morriar Morriar added the bugfix Fix a bug label Jul 31, 2024
@Morriar Morriar self-assigned this Jul 31, 2024
@Morriar Morriar requested a review from a team as a code owner July 31, 2024 19:53
@Morriar Morriar requested review from amomchilov and egiurleo July 31, 2024 19:53
lib/rbi/parser.rb Outdated Show resolved Hide resolved
Signed-off-by: Alexandre Terrasa <[email protected]>
@Morriar Morriar force-pushed the at-fix-parse-comments branch from 86a9dd8 to bd6b241 Compare August 1, 2024 15:07
Copy link
Contributor

@egiurleo egiurleo left a comment

Choose a reason for hiding this comment

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

Woohoo much clearer now!

@Morriar Morriar merged commit e63946e into main Aug 2, 2024
8 checks passed
@Morriar Morriar deleted the at-fix-parse-comments branch August 2, 2024 13:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix Fix a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants