Sha256: a43f35d9d82d0b50af3147a965032270ae83331ddacc66167205b045ad17b0f3

Contents?: true

Size: 617 Bytes

Versions: 9

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

9 entries across 9 versions & 3 rubygems

Version Path
metric_fu-4.13.0 lib/metric_fu/metrics/roodi/hotspot.rb
fastruby-metric_fu-5.0.0 lib/metric_fu/metrics/roodi/hotspot.rb
code_metric_fu-4.14.4 lib/metric_fu/metrics/roodi/hotspot.rb
code_metric_fu-4.14.3 lib/metric_fu/metrics/roodi/hotspot.rb
code_metric_fu-4.14.2 lib/metric_fu/metrics/roodi/hotspot.rb
code_metric_fu-4.14.1 lib/metric_fu/metrics/roodi/hotspot.rb
code_metric_fu-4.14.0 lib/metric_fu/metrics/roodi/hotspot.rb
metric_fu-4.12.0 lib/metric_fu/metrics/roodi/hotspot.rb
metric_fu-4.11.4 lib/metric_fu/metrics/roodi/hotspot.rb