class CopsDocumentationGenerator

def print_cop_with_doc(cop)

def print_cop_with_doc(cop)
  cop_config = config.for_cop(cop)
  non_display_keys = %w[
    Description Enabled StyleGuide Reference Safe SafeAutoCorrect VersionAdded
    VersionChanged
  ]
  pars = cop_config.reject { |k| non_display_keys.include? k }
  description = 'No documentation'
  examples_object = safety_object = []
  cop_code(cop) do |code_object|
    description = code_object.docstring unless code_object.docstring.blank?
    examples_object = code_object.tags('example')
    safety_object = code_object.tags('safety')
  end
  cops_body(cop, description, examples_object, safety_object, pars)
end