Sha256: 0224fb36507d98bd80f42eaf8884053a4e01d1494041f5262aafdd9b98720591

Contents?: true

Size: 659 Bytes

Versions: 9

Compression:

Stored size: 659 Bytes

Contents

module MetricFu
  class MetricCane < Metric
    def name
      :cane
    end

    def default_run_options
      {
        dirs_to_cane: MetricFu::Io::FileSystem.directory("code_dirs"),
        abc_max: 15,
        line_length: 80,
        no_doc: "n",
        no_readme: "n",
        filetypes: ["rb"]
      }
    end

    def has_graph?
      true
    end

    def enable
      if MetricFu.configuration.supports_ripper? && !MetricFu.configuration.ruby18?
        super
      else
        MetricFu.logger.debug("Cane is only available in MRI. It requires ripper and 1.9 hash syntax support")
      end
    end

    def activate
      super
    end
  end
end

Version data entries

9 entries across 9 versions & 3 rubygems

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