Module: Watchr::Analysers::Reek
Constant Summary
Constants included from SmellTypes
Instance Method Summary collapse
Instance Method Details
#analyse_reek(report) ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/watchr/analysers/reek.rb', line 8 def analyse_reek(report) report.smells.each do |reek_smell| location = reek_smell.location smell = reek_smell.smell builder = Watchr::SmellBuilder.new( underscore(smell['subclass']).to_sym, location['context'], smell['message'] ) builder.add_location( location['source'], location['lines'].first ) add_smell(builder.smell) end end |