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

Move ProcessedSource#sorted_tokens to be a public method #195

Merged
merged 1 commit into from
Aug 6, 2021

Conversation

dvandersluis
Copy link
Member

A number of cops are not detecting issues when looking at tokens around heredocs (for instance Layout/SpaceInsideParams) because they use pairs of tokens, but the tokens are not sorted properly for heredocs as method arguments (as per the comment of ProcessedSource#sorted_tokens).

For instance, this space is not detected by Layout/SpaceInsideParams currently because the tokens are not sorted in the expected order:

foo(<<~STR )
  text
STR

This change just moves that method to be public so that the cops can use it.

@marcandre marcandre merged commit 18a2934 into rubocop:master Aug 6, 2021
@marcandre
Copy link
Contributor

Released in 1.9.0 👍

@dvandersluis
Copy link
Member Author

Thank you!

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.

2 participants