Sha256: 93df2e1939c45d179dafb9ccaba3df3811a8880c30f702bf95a067034fdbad7e

Contents?: true

Size: 791 Bytes

Versions: 212

Compression:

Stored size: 791 Bytes

Contents

require 'brakeman/processors/lib/processor_helper'
require 'brakeman/processors/lib/safe_call_helper'
require 'brakeman/util'

class Brakeman::BasicProcessor < Brakeman::SexpProcessor
  include Brakeman::ProcessorHelper
  include Brakeman::SafeCallHelper
  include Brakeman::Util

  def initialize tracker
    super()
    @tracker = tracker
    @current_template = @current_module = @current_class = @current_method = nil
  end

  def process_default exp
    process_all exp
  end

  def process_if exp
    condition = exp.condition

    process condition

    if true? condition
      process exp.then_clause
    elsif false? condition
      process exp.else_clause
    else
      [exp.then_clause, exp.else_clause].compact.map do |e|
        process e
      end
    end

    exp
  end
end

Version data entries

212 entries across 198 versions & 4 rubygems

Version Path
brakeman-lib-4.10.0 lib/brakeman/processors/lib/basic_processor.rb
brakeman-min-4.10.0 lib/brakeman/processors/lib/basic_processor.rb
brakeman-4.9.1 lib/brakeman/processors/lib/basic_processor.rb
brakeman-min-4.9.1 lib/brakeman/processors/lib/basic_processor.rb
brakeman-lib-4.9.1 lib/brakeman/processors/lib/basic_processor.rb
brakeman-4.9.0 lib/brakeman/processors/lib/basic_processor.rb
brakeman-min-4.9.0 lib/brakeman/processors/lib/basic_processor.rb
brakeman-lib-4.9.0 lib/brakeman/processors/lib/basic_processor.rb
brakeman-4.8.2 lib/brakeman/processors/lib/basic_processor.rb
brakeman-lib-4.8.2 lib/brakeman/processors/lib/basic_processor.rb
brakeman-min-4.8.2 lib/brakeman/processors/lib/basic_processor.rb
brakeman-4.8.1 lib/brakeman/processors/lib/basic_processor.rb
brakeman-lib-4.8.1 lib/brakeman/processors/lib/basic_processor.rb
brakeman-min-4.8.1 lib/brakeman/processors/lib/basic_processor.rb
brakeman-4.8.0 lib/brakeman/processors/lib/basic_processor.rb
brakeman-lib-4.8.0 lib/brakeman/processors/lib/basic_processor.rb
brakeman-min-4.8.0 lib/brakeman/processors/lib/basic_processor.rb
zuora_connect_ui-0.10.0 vendor/ruby/2.6.0/gems/brakeman-4.7.0/lib/brakeman/processors/lib/basic_processor.rb
zuora_connect_ui-0.10.0 vendor/ruby/2.6.0/gems/brakeman-4.7.2/lib/brakeman/processors/lib/basic_processor.rb
zuora_connect_ui-0.10.0 vendor/ruby/2.6.0/gems/brakeman-4.5.1/lib/brakeman/processors/lib/basic_processor.rb