class RuboCop::Cop::Migration::DepartmentName
def on_new_investigation
def on_new_investigation processed_source.comments.each do |comment| next if comment.text !~ DISABLE_COMMENT_FORMAT offset = Regexp.last_match(1).length Regexp.last_match(4).scan(/[^,]+|\W+/) do |name| trimmed_name = name.strip unless valid_content_token?(trimmed_name) check_cop_name(trimmed_name, comment, offset) end break if contain_unexpected_character_for_department_name?(name) offset += name.length end end end