Report for <%= @url %>
SITEMAP SUMMARY
TOTAL: <%= errors.length %> errors, <%= warnings.length %> warnings.
<% if errors.length > 0 %>POPULAR ERRORS
-
<% errors.group_by {|e| e.message_id}.sort_by {|m,e| e.length}.reverse.each do |message_id, errors| %>
<% if message_id == 'html5' %>
- <%= errors.length %> HTML5 errors found
- <%= errors.length %> times: <%= text %> <% end %>
- error <%= message_id %> happens <%= errors.length %> times <% end %> <% end %>
-
<% errors.select{|e| e.message_id == 'html5'}
.group_by {|e| e.text}
.sort_by {|m,e| e.length}
.reverse.each do |text, errors| %>
POPULAR WARNINGS
-
<% warnings.group_by {|w| w.message_id}.sort_by {|m,w| w.length}.reverse.each do |message_id, warnings| %>
<% if message_id == 'html5' %>
- <%= warnings.length %> HTML5 warnings found
- <%= warnings.length %> times: <%= text %> <% end %>
- warning <%= message_id %> found <%= warnings.length %> times <% end %> <% end %>
-
<% warnings.select{|w| w.message_id == 'html5'}
.group_by {|w| w.text}
.sort_by {|m,w| w.length}
.reverse.each do |text, warnings| %>
DETAILS PER PAGE
<% processed_pages.each do |page| %><%= page.url %>
<%= "#{page.errors.length} errors, #{page.warnings.length} warnings" %>
-
<% page.errors.sort_by {|e| e.line.to_i}.each do |error| %>
- <% if error.message_id == 'html5' %> HTML5 error on line <%= error.line %>: <% else %> Error <%= error.message_id %> on line <%= error.line %>: <% end %> <%= error.text %> <% end %>
-
<% page.warnings.sort_by {|w| w.line.to_i}.each do |warning| %>
- <% if warning.message_id == 'html5' %> HTML5 warning on line <%= warning.line %>: <% else %> Warning <%= warning.message_id %> on line <%= warning.line %>: <% end %> <%= warning.text %> <% end %>