Sha256: 800125082a1374d9a6cfc33365e47e76e8610d2d693fb65344252d2024e99ffb

Contents?: true

Size: 794 Bytes

Versions: 97

Compression:

Stored size: 794 Bytes

Contents

module CC
  class Config
    module Validation
      class PrepareValidator
        include HashValidations

        attr_reader :errors, :warnings

        def initialize(data)
          @data = data

          @errors = []
          @warnings = []

          validate
        end

        private

        attr_reader :data

        def validate
          return unless validate_key_type("fetch", Array)

          data.fetch("fetch", []).each do |fetch_data|
            validator = FetchValidator.new(fetch_data)
            validator.errors.each do |msg|
              errors << msg
            end
            validator.warnings.each do |msg|
              warnings << msg
            end
          end

          warn_unrecognized_keys(%w[fetch])
        end
      end
    end
  end
end

Version data entries

97 entries across 97 versions & 2 rubygems

Version Path
codeclimate-0.78.0 lib/cc/config/validation/prepare_validator.rb
codeclimate-0.77.0 lib/cc/config/validation/prepare_validator.rb
codeclimate-0.76.0 lib/cc/config/validation/prepare_validator.rb
codeclimate-0.75.0 lib/cc/config/validation/prepare_validator.rb
codeclimate-0.74.0 lib/cc/config/validation/prepare_validator.rb
codeclimate-0.73.0 lib/cc/config/validation/prepare_validator.rb
codeclimate-0.72.0 lib/cc/config/validation/prepare_validator.rb
codeclimate-0.71.2 lib/cc/config/validation/prepare_validator.rb
codeclimate-0.71.1 lib/cc/config/validation/prepare_validator.rb
codeclimate-0.71.0 lib/cc/config/validation/prepare_validator.rb
codeclimate-0.70.6 lib/cc/config/validation/prepare_validator.rb
codeclimate-0.70.5 lib/cc/config/validation/prepare_validator.rb
codeclimate-0.70.4 lib/cc/config/validation/prepare_validator.rb
codeclimate-0.70.3 lib/cc/config/validation/prepare_validator.rb
codeclimate-0.70.2 lib/cc/config/validation/prepare_validator.rb
codeclimate-0.70.1 lib/cc/config/validation/prepare_validator.rb
codeclimate-0.70.0 lib/cc/config/validation/prepare_validator.rb