class RuboCop::Cop::Migration::DepartmentName

department name.
Check that cop names in rubocop:disable comments are given with

def check_cop_name(name, comment, offset)

def check_cop_name(name, comment, offset)
  start = comment.source_range.begin_pos + offset
  range = range_between(start, start + name.length)
  add_offense(range) do |corrector|
    cop_name = range.source
    qualified_cop_name = Registry.global.qualified_cop_name(cop_name, nil, warn: false)
    unless qualified_cop_name.include?('/')
      qualified_cop_name = qualified_legacy_cop_name(cop_name)
    end
    corrector.replace(range, qualified_cop_name)
  end
end

def contain_unexpected_character_for_department_name?(name)

def contain_unexpected_character_for_department_name?(name)
  name.match?(%r{[^A-Za-z/, ]})
end

def disable_comment_offset

def disable_comment_offset
  Regexp.last_match(1).length
end

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

def qualified_legacy_cop_name(cop_name)

def qualified_legacy_cop_name(cop_name)
  legacy_cop_names = RuboCop::ConfigObsoletion.legacy_cop_names
  legacy_cop_names.detect { |legacy_cop_name| legacy_cop_name.split('/')[1] == cop_name }
end

def valid_content_token?(content_token)

def valid_content_token?(content_token)
  /\W+/.match?(content_token) ||
    DISABLING_COPS_CONTENT_TOKEN.match?(content_token) ||
    Registry.global.department?(content_token)
end