Sha256: e624ae97d28b7efe2e08b9961cdc5e81590865412b1231d752a2cf903c403ce3
Contents?: true
Size: 779 Bytes
Versions: 2
Compression:
Stored size: 779 Bytes
Contents
require "rubycritic/analysers/reek" require "rubycritic/core/smell" module Rubycritic module SmellAdapter class Reek def initialize(paths) @reek = ::Rubycritic::Analyser::Reek.new(paths) end def smells @reek.smells.map do |smell| create_smell(smell) end end private def create_smell(smell) Smell.new( :locations => smell_locations(smell.source, smell.lines), :context => smell.context, :message => smell.message, :type => smell.subclass ) end def smell_locations(file_path, file_lines) file_lines.uniq.map do |file_line| Location.new(file_path, file_line) end.sort end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
rubycritic-0.0.14 | lib/rubycritic/adapters/smell/reek.rb |
rubycritic-0.0.13 | lib/rubycritic/adapters/smell/reek.rb |