We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
each_comment_in_lines
1 parent 935ae8e commit c7d8b3eCopy full SHA for c7d8b3e
lib/rubocop/cop/rails/active_record_callbacks_order.rb
@@ -112,8 +112,7 @@ def begin_pos_with_comment(node)
112
annotation_line = node.first_line - 1
113
first_comment = nil
114
115
- processed_source.comments_before_line(annotation_line)
116
- .reverse_each do |comment|
+ processed_source.each_comment_in_lines(0..annotation_line).reverse_each do |comment|
117
if comment.location.line == annotation_line && !inline_comment?(comment)
118
first_comment = comment
119
annotation_line -= 1
0 commit comments