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
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 1 addition & 2 deletions lib/rubocop/cop/rspec/mixin/empty_line_separation.rb
Expand Up @@ -25,8 +25,7 @@ def missing_separating_line_offense(node)

def missing_separating_line(node)
line = final_end_line = final_end_location(node).line

while comment_line?(processed_source[line])
while processed_source.line_with_comment?(line + 1)
line += 1
comment = processed_source.comment_at_line(line)
if DirectiveComment.new(comment).enabled?
Expand Down