Sha256: 34ba14aa7cc3f6e2c55b5d59feab7fb26e10ceb93b782f8884577a3baf9aadc8

Contents?: true

Size: 1.99 KB

Versions: 36

Compression:

Stored size: 1.99 KB

Contents

<h3>Flog Results</h3>
<p><a href='http://ruby.sadi.st/Flog.html'>Flog</a> measures code complexity.</p>

<% graph_name = 'flog' %>
<% if MetricFu.configuration.graph_engine == :gchart %>
<img src="<%= graph_name %>.png?<%= Time.now.to_i %>" />
<% else %>
<canvas id="graph"></canvas>
<script language="javascript" src="<%= graph_name %>.js?<%= Time.now.to_i %>" type="text/javascript"></script>
<% end %>

<h2>Total Flog score for all methods: <%= round_to_tenths @flog[:total]%></h2>
<h2>Average Flog score for all methods: <%= round_to_tenths @flog[:average]%></h2>

<table>
  <tr>
    <th>File</th>
    <th>Total score</th>
    <th>Methods</th>
    <th>Average score</th>
    <th>Highest score</th>
  </tr>
    <% @flog[:method_containers].each do |method_container| %>
    <tr>
      <td><a href="#<%= method_container[:path].gsub(/[^a-z]+/, '_') %>"><%= method_container[:path] %></a></td>
      <td><%= round_to_tenths  method_container[:total_score] %></td>
      <td><%= method_container[:methods].size %></td>
      <td><%= round_to_tenths method_container[:average_score] %></td>
      <td><%= round_to_tenths method_container[:highest_score] %></td>
    </tr>
  <% end %>
</table>

<% @flog[:method_containers].each do |method_container| %>
  <h2 id="<%= method_container[:path].gsub(/[^a-z]+/, '_') %>"><%= link_to_filename(method_container[:path]) %></h2>

    <% method_container[:methods].each do |full_method_name, method_info| %>
      <% path, line = method_info[:path].split(":") if method_info[:path] %>
      <p><%= link_to_filename(path, line, full_method_name) %></p>
      <p>Total Score: <%= round_to_tenths method_info[:score]%></p>
      <table>
        <tr>
          <th>Score</th>
          <th>Operator</th>
        </tr>
        <% method_info[:operators].each do |operator, score| %>
          <tr>
            <td><%= round_to_tenths score %></td>
            <td><%= operator %></td>
          </tr>
        <% end %>
      </table>
    <% end %>
<% end %>
<p>Generated on <%= Time.now.localtime %></p>

Version data entries

36 entries across 36 versions & 4 rubygems

Version Path
metric_fu-4.4.4 lib/metric_fu/metrics/flog/template_awesome/flog.html.erb
metric_fu-4.4.3 lib/metric_fu/metrics/flog/template_awesome/flog.html.erb
metric_fu-4.4.2 lib/metric_fu/metrics/flog/template_awesome/flog.html.erb
metric_fu-4.4.1 lib/metric_fu/metrics/flog/template_awesome/flog.html.erb
metric_fu-4.4.0 lib/metric_fu/metrics/flog/template_awesome/flog.html.erb
metric_fu-4.3.1 lib/metric_fu/metrics/flog/template_awesome/flog.html.erb
metric_fu-4.3.0 lib/metric_fu/metrics/flog/template_awesome/flog.html.erb
metric_fu-4.2.1 lib/metric_fu/metrics/flog/template_awesome/flog.html.erb
metric_fu-4.2.0 lib/metric_fu/metrics/flog/template_awesome/flog.html.erb
metric_fu-4.1.3 lib/metric_fu/metrics/flog/template_awesome/flog.html.erb
metric_fu-4.1.2 lib/metric_fu/metrics/flog/template_awesome/flog.html.erb
metric_fu-4.1.1 lib/metric_fu/metrics/flog/template_awesome/flog.html.erb
metric_fu-4.1.0 lib/metric_fu/metrics/flog/template_awesome/flog.html.erb
metric_fu-4.0.0 lib/metric_fu/metrics/flog/template_awesome/flog.html.erb
metric_fu-3.0.1 lib/metric_fu/metrics/flog/template_awesome/flog.html.erb
metric_fu-3.0.0 lib/metric_fu/metrics/flog/template_awesome/flog.html.erb
metric_fu-2.1.4.pre5 lib/metric_fu/metrics/flog/template_awesome/flog.html.erb
metric_fu-2.1.4.pre4 lib/metric_fu/metrics/flog/template_awesome/flog.html.erb
metric_fu-2.1.4.pre2 lib/metric_fu/metrics/flog/template_awesome/flog.html.erb
metric_fu-2.1.4.pre lib/metric_fu/metrics/flog/template_awesome/flog.html.erb