Sha256: 15b655cbc4c89f8af203d7397bf8af4b2d144ecc024e403bf59850eeb8e0e418

Contents?: true

Size: 642 Bytes

Versions: 10

Compression:

Stored size: 642 Bytes

Contents

require 'brakeman/report/report_table'

#Generated tab-separated output suitable for the Jenkins Brakeman Plugin:
#https://github.com/presidentbeef/brakeman-jenkins-plugin
class Brakeman::Report::Tabs < Brakeman::Report::Table
  def generate_report
    [[:generic_warnings, "General"], [:controller_warnings, "Controller"],
      [:model_warnings, "Model"], [:template_warnings, "Template"]].map do |meth, category|

      self.send(meth).map do |w|
        line = w.line || 0
        "#{(w.file.absolute)}\t#{line}\t#{w.warning_type}\t#{category}\t#{w.format_message}\t#{w.confidence_name}"
      end.join "\n"

    end.join "\n"

  end
end

Version data entries

10 entries across 10 versions & 3 rubygems

Version Path
brakeman-6.2.2 lib/brakeman/report/report_tabs.rb
brakeman-lib-6.2.2 lib/brakeman/report/report_tabs.rb
brakeman-min-6.2.2 lib/brakeman/report/report_tabs.rb
brakeman-6.2.2.rc1 lib/brakeman/report/report_tabs.rb
brakeman-min-6.2.1 lib/brakeman/report/report_tabs.rb
brakeman-lib-6.2.1 lib/brakeman/report/report_tabs.rb
brakeman-6.2.1 lib/brakeman/report/report_tabs.rb
brakeman-6.2.0 lib/brakeman/report/report_tabs.rb
brakeman-lib-6.2.0 lib/brakeman/report/report_tabs.rb
brakeman-min-6.2.0 lib/brakeman/report/report_tabs.rb