class RuboCop::Cop::Style::DisableCopsWithinSourceCodeDirective

def on_new_investigation

def on_new_investigation
  processed_source.comments.each do |comment|
    directive_cops = directive_cops(comment)
    disallowed_cops = directive_cops - allowed_cops
    next unless disallowed_cops.any?
    register_offense(comment, directive_cops, disallowed_cops)
  end
end