Sha256: 98314ff17da8c621f994c4aeccf35725bc76e675c5eeeca8d3d25dff37516d49

Contents?: true

Size: 567 Bytes

Versions: 20

Compression:

Stored size: 567 Bytes

Contents

# frozen_string_literal: true

module Quality
  module Tools
    # Adds 'rubocop' tool support to quality gem
    class Brakeman < Tool
      def quality_brakeman
        ratchet_quality_cmd('brakeman',
                            args: '-q --summary -f csv 2>/dev/null',
                            gives_error_code_on_no_relevant_code:
                              true) do |line|
          if line =~ /Security Warnings,([0-9]*) \([0-9]*\)$/
            Regexp.last_match[1].to_i
          else
            0
          end
        end
      end
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
quality-40.0.1 lib/quality/tools/brakeman.rb
quality-40.0.0 lib/quality/tools/brakeman.rb
quality-39.0.1 lib/quality/tools/brakeman.rb
quality-38.0.1 lib/quality/tools/brakeman.rb
quality-38.0.0 lib/quality/tools/brakeman.rb
quality-37.1.1 lib/quality/tools/brakeman.rb
quality-37.1.0 lib/quality/tools/brakeman.rb
quality-37.0.1 lib/quality/tools/brakeman.rb
quality-37.0.0 lib/quality/tools/brakeman.rb
quality-36.1.0 lib/quality/tools/brakeman.rb
quality-36.0.0 lib/quality/tools/brakeman.rb
quality-35.2.1 lib/quality/tools/brakeman.rb
quality-35.2.0 lib/quality/tools/brakeman.rb
quality-35.1.1 lib/quality/tools/brakeman.rb
quality-35.0.1 lib/quality/tools/brakeman.rb
quality-35.0.0 lib/quality/tools/brakeman.rb
quality-34.0.2 lib/quality/tools/brakeman.rb
quality-34.0.1 lib/quality/tools/brakeman.rb
quality-34.0.0 lib/quality/tools/brakeman.rb
quality-33.0.0 lib/quality/tools/brakeman.rb