Sha256: 6917ed77ee2f2735d1dd2cae6a2afa4ecffe8c57b0cd891208981275704ac491
Contents?: true
Size: 810 Bytes
Versions: 1
Compression:
Stored size: 810 Bytes
Contents
#!/usr/bin/env ruby require 'json' require 'tins/xt' require 'tins/go' include Tins::GO opts = go 'c' if opts[?c] brakeman = `bundle exec which brakeman`.full? or fail "cannot find brakeman in path" system *%w'bundle exec brakeman -q -s brakeman_ignore --url-safe-methods brakeman_ignore -o .brakeman.json' or fail "calling brakeman failed" end results = JSON File.read('.brakeman.json'), object_class: JSON::GenericObject puts "Found #{results.errors.size} errors and #{results.warnings.size} warnings.", "_" * 80 for error in results.errors puts error.location, "Error #{error.error.inspect}" end for warning in results.warnings puts "#{warning.file}:#{warning.line}", "#{warning.warning_type} (#{warning.confidence}) #{warning.message.inspect}", warning.code, "See: #{warning.link}" end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
utils-0.9.0 | bin/brakeman2err |