class RuboCop::Cop::Style::InlineComment

end
f.bar # Trailing inline comment
foo.each do |f|
# bad
end
f.bar
# Standalone comment
foo.each do |f|
# good
@example
Checks for trailing inline comments.

def on_new_investigation

def on_new_investigation
  processed_source.comments.each do |comment|
    next if comment_line?(processed_source[comment.loc.line - 1]) ||
            comment.text.match?(/\A# rubocop:(enable|disable)/)
    add_offense(comment)
  end
end