Sha256: 9f34a24b2350ba37013a25af4f0470e2715f457b8ef00b7f893645d6f56b0bf9

Contents?: true

Size: 617 Bytes

Versions: 19

Compression:

Stored size: 617 Bytes

Contents

class MetricFu::RoodiHotspot < MetricFu::Hotspot

  COLUMNS = %w{problems}

  def columns
    COLUMNS
  end

  def name
    :roodi
  end

  def map_strategy
    :present
  end

  def reduce_strategy
    :sum
  end

  def score_strategy
    :percentile
  end

  def generate_records(data, table)
    return if data==nil
    Array(data[:problems]).each do |problem|
      table << {
        "metric" => name,
        "problems" => problem[:problem],
        "file_path" => problem[:file]
      }
    end
  end

  def present_group(group)
    occurences = group.size
    "found #{occurences} design problems"
  end

end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
metric_fu-4.11.3 lib/metric_fu/metrics/roodi/hotspot.rb
metric_fu-4.11.2 lib/metric_fu/metrics/roodi/hotspot.rb
metric_fu-4.11.1 lib/metric_fu/metrics/roodi/hotspot.rb
metric_fu-4.11.0 lib/metric_fu/metrics/roodi/hotspot.rb
metric_fu-4.10.0 lib/metric_fu/metrics/roodi/roodi_hotspot.rb
metric_fu-4.9.0 lib/metric_fu/metrics/roodi/roodi_hotspot.rb
metric_fu-4.8.0 lib/metric_fu/metrics/roodi/roodi_hotspot.rb
metric_fu-4.7.4 lib/metric_fu/metrics/roodi/roodi_hotspot.rb
metric_fu-4.7.3 lib/metric_fu/metrics/roodi/roodi_hotspot.rb
metric_fu-4.7.2 lib/metric_fu/metrics/roodi/roodi_hotspot.rb
metric_fu-4.7.1 lib/metric_fu/metrics/roodi/roodi_hotspot.rb
metric_fu-4.7.0 lib/metric_fu/metrics/roodi/roodi_hotspot.rb
metric_fu-4.6.0 lib/metric_fu/metrics/roodi/roodi_hotspot.rb
metric_fu-4.5.2 lib/metric_fu/metrics/roodi/roodi_hotspot.rb
metric_fu-4.5.1 lib/metric_fu/metrics/roodi/roodi_hotspot.rb
metric_fu-4.4.4 lib/metric_fu/metrics/roodi/roodi_hotspot.rb
metric_fu-4.4.3 lib/metric_fu/metrics/roodi/roodi_hotspot.rb
metric_fu-4.4.2 lib/metric_fu/metrics/roodi/roodi_hotspot.rb
metric_fu-4.4.1 lib/metric_fu/metrics/roodi/roodi_hotspot.rb