Cane Results
Cane reports code quality threshold violations.
<%= render_partial 'graph', {:graph_name => 'cane'} %>
<% if @cane[:violations][:abc_complexity] && @cane[:violations][:abc_complexity].size > 0 %>
Methods exceeding allowed Abc complexity (<%= @cane[:violations][:abc_complexity].size %>)
File |
Method |
Complexity |
<% count = 0 %>
<% @cane[:violations][:abc_complexity].each do |violation| %>
<%=link_to_filename(violation[:file])%> |
<%=violation[:method]%> |
<%=violation[:complexity]%> |
<% count += 1 %>
<% end %>
<% end %>
<% if @cane[:violations][:line_style] && @cane[:violations][:line_style].size > 0 %>
Lines violating style requirements (<%= @cane[:violations][:line_style].size %>)
File |
Description |
<% count = 0 %>
<% @cane[:violations][:line_style].each do |violation| %>
<%=link_to_filename(*violation[:line].split(':'))%> |
<%=violation[:description]%> |
<% count += 1 %>
<% end %>
<% end %>
<% if @cane[:violations][:documentation] && @cane[:violations][:documentation].size > 0 %>
Missing documentation (<%= @cane[:violations][:documentation].size %>)
Description |
<% @cane[:violations][:documentation].each do |violation| %>
<%=violation[:description]%> |
<% end %>
<% end %>
<% if @cane[:violations][:comment] && @cane[:violations][:comment].size > 0 %>
Class definitions requiring comments (<%= @cane[:violations][:comment].size %>)
File |
Class |
<% count = 0 %>
<% @cane[:violations][:comment].each do |violation| %>
<%=link_to_filename(*violation[:line].split(':'))%> |
<%=violation[:class_name]%> |
<% count += 1 %>
<% end %>
<% end %>
<% if @cane[:violations][:others] && @cane[:violations][:others].size > 0 %>
Others (<%= @cane[:violations][:others].size %>)
Description |
<% @cane[:violations][:others].each do |violation| %>
<%=violation[:description]%> |
<% end %>
<% end %>
<%= render_partial 'report_footer' %>