diff --git a/lib/pronto.rb b/lib/pronto.rb index 62502f8c..51d7d82e 100644 --- a/lib/pronto.rb +++ b/lib/pronto.rb @@ -49,6 +49,7 @@ require 'pronto/formatter/bitbucket_pull_request_formatter' require 'pronto/formatter/bitbucket_server_pull_request_formatter' require 'pronto/formatter/checkstyle_formatter' +require 'pronto/formatter/html_formatter' require 'pronto/formatter/null_formatter' require 'pronto/formatter/formatter' diff --git a/lib/pronto/assets/logo.png b/lib/pronto/assets/logo.png new file mode 100644 index 00000000..c091ad7f Binary files /dev/null and b/lib/pronto/assets/logo.png differ diff --git a/lib/pronto/assets/output.html.erb b/lib/pronto/assets/output.html.erb new file mode 100644 index 00000000..9f88b4e9 --- /dev/null +++ b/lib/pronto/assets/output.html.erb @@ -0,0 +1,119 @@ + + + +
+ + + + + +<%= offense.line.line.content.force_encoding('UTF-8') %>
+ #{Regexp.last_match(1)}
"
+ end.force_encoding('UTF-8')
+ end
+
+ def pluralize(number, thing, options = {})
+ if number.zero? && options[:no_for_zero]
+ "no #{thing}s"
+ elsif number == 1
+ "1 #{thing}"
+ else
+ "#{number} #{thing}s"
+ end
+ end
+
+ def escape(string)
+ CGI.escapeHTML(string)
+ end
+ end
+ end
+ end
+end
+