class RubyCritic::Smell

def ==(other)

def ==(other)
  state == other.state
end

def at_location?(other_location)

def at_location?(other_location)
  locations.any?(other_location)
end

def dasherized_type

def dasherized_type
  type.gsub(/(?<!^)([A-Z])/, '-\1')
end

def doc_url

def doc_url
  case analyser
  when 'reek'
    "https://github.com/troessner/reek/blob/master/docs/#{dasherized_type}.md"
  when 'flay'
    FLAY_DOCS_URL
  when 'flog'
    FLOG_DOCS_URL
  else
    raise "No documentation URL set for analyser '#{analyser}' smells"
  end
end

def hash

def hash
  state.hash
end

def multiple_locations?

def multiple_locations?
  locations.length > 1
end

def state

def state
  [context, message, score, type]
end

def to_h

def to_h
  {
    context: context,
    cost: cost,
    locations: locations,
    message: message,
    score: score,
    status: status,
    type: type
  }
end

def to_json(*options)

def to_json(*options)
  to_h.to_json(*options)
end

def to_s

def to_s
  "(#{type}) #{context} #{message}"
end