diff --git a/assets/result.html.erb b/assets/result.html.erb
index 2e4253d9..774c3ba2 100644
--- a/assets/result.html.erb
+++ b/assets/result.html.erb
@@ -22,18 +22,18 @@
margin: 10px 0;
font-size: 14px;
}
- table th, table td {
+ table.result th, table.result td {
padding: 4px;
border: 1px solid #D0D0D0;
}
- table th {
+ table.result th {
background-color: #DFC;
color: #337022;
}
- table td.filename {
+ table.result td.filename {
color: #ED1556;
}
- table tr:hover {
+ table.result tr:hover {
background-color: #FFFFC0;
}
ul {
@@ -48,6 +48,14 @@
float: left;
}
+<%
+ def columnize(arr, col_count)
+ row_count = arr.size / col_count
+ row_count += 1 if arr.size % col_count > 0
+ cols = arr.each_slice(row_count).to_a
+ cols[0].zip(*cols[1..-1]).map(&:compact)
+ end
+%>
rails_best_practices output
@@ -63,59 +71,73 @@
Found <%= @errors.size %> warnings.
<% end %>
-
+
+
+
+ Filename |
+ Line Number |
+ Warning Message |
<% if @hg %>
- <%= error.hg_commit %> |
- <%= error.hg_username %> |
+ Hg Commit |
+ Hg Username |
<% elsif @git %>
- <%= error.git_commit %> |
- <%= error.git_username %> |
+ Git Commit |
+ Git Username |
<% end %>
- <% end %>
+
+
+ <% @errors.each do |error| %>
+
+
+ <% if @github %>
+ <%= error.short_filename %>
+ <% elsif @textmate %>
+ <%= error.short_filename %>
+ <% elsif @mvim %>
+ <%= error.short_filename %>
+ <% else %>
+ <%= error.short_filename %>
+ <% end %>
+ |
+ <%= error.line_number %> |
+
+ <%= error.message %>
+ |
+ <% if @hg %>
+ <%= error.hg_commit %> |
+ <%= error.hg_username %> |
+ <% elsif @git %>
+ <%= error.git_commit %> |
+ <%= error.git_username %> |
+ <% end %>
+
+ <% end %>
+
-
+