lib/brakeman/report.rb in brakeman-min-3.3.5 vs lib/brakeman/report.rb in brakeman-min-3.4.0

- old
+ new

@@ -4,11 +4,11 @@ #Tracker#run_checks. Be sure to +run_checks+ before generating #a report. class Brakeman::Report attr_reader :tracker - VALID_FORMATS = [:to_html, :to_pdf, :to_csv, :to_json, :to_tabs, :to_hash, :to_s, :to_markdown, :to_codeclimate] + VALID_FORMATS = [:to_html, :to_pdf, :to_csv, :to_json, :to_tabs, :to_hash, :to_s, :to_markdown, :to_codeclimate, :to_plain] def initialize app_tree, tracker @app_tree = app_tree @tracker = tracker end @@ -32,10 +32,12 @@ when :to_hash require_report 'hash' Brakeman::Report::Hash when :to_markdown return self.to_markdown + when :to_plain + return self.to_plain when :to_s return self.to_s when :to_pdf raise "PDF output is not yet supported." else @@ -68,9 +70,14 @@ end def to_markdown require_report 'markdown' generate Brakeman::Report::Markdown + end + + def to_plain + require_report 'text' + generate Brakeman::Report::Text end def generate reporter reporter.new(@app_tree, @tracker).generate_report end