Sha256: 72c5ac3ed16322c3b0bdbfb27f51298785ce94323f5efbccbfa3220ad749b73b

Contents?: true

Size: 708 Bytes

Versions: 6

Compression:

Stored size: 708 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.warning_type.gsub!(/[^\w\s]/, ' ')
        "#{warning_file(w, :absolute)}\t#{line}\t#{w.warning_type}\t#{category}\t#{w.format_message}\t#{TEXT_CONFIDENCE[w.confidence]}"
      end.join "\n"

    end.join "\n"

  end
end

Version data entries

6 entries across 6 versions & 3 rubygems

Version Path
brakeman-4.5.0 lib/brakeman/report/report_tabs.rb
brakeman-min-4.5.0 lib/brakeman/report/report_tabs.rb
brakeman-lib-4.5.0 lib/brakeman/report/report_tabs.rb
brakeman-4.4.0 lib/brakeman/report/report_tabs.rb
brakeman-lib-4.4.0 lib/brakeman/report/report_tabs.rb
brakeman-min-4.4.0 lib/brakeman/report/report_tabs.rb