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

Use line_with_comment? instead of bad API #1577

Merged
merged 1 commit into from Feb 7, 2023

Conversation

ydah
Copy link
Member

@ydah ydah commented Feb 7, 2023

RuboCop::Cop::Util#comment_line? is flagged by rubocop/rubocop#8405 as a bad API. So I propose to fix not use this method.


Before submitting the PR make sure the following are checked:

  • Feature branch is up-to-date with master (if not - rebase it).
  • Squashed related commits together.
  • [-] Added tests.
  • [-] Updated documentation.
  • [-] Added an entry to the CHANGELOG.md if the new code introduces user-observable changes.
  • The build (bundle exec rake) passes (be sure to run this locally, since it may produce updated documentation that you will need to commit).

`RuboCop::Cop::Util#comment_line?` is flagged by rubocop/rubocop#8405 as a bad API.
So I propose to fix not use this method.
Copy link
Collaborator

@bquorning bquorning left a comment

Choose a reason for hiding this comment

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

Do you know if processed_source.line_with_comment? is available only in recent versions of rubocop / rubocop_ast?

@ydah
Copy link
Member Author

ydah commented Feb 7, 2023

@bquorning bquorning merged commit 7fee61a into rubocop:master Feb 7, 2023
@ydah ydah deleted the not-use-comment_line branch March 5, 2023 11:53
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.

None yet

2 participants