Validates the consistency of a Binder::BinderConfig
Validate the consistency of the given data. Diagnostics will be emitted to the DiagnosticProducer that was set when this checker was created
@param data [Object] The data read from the config file @param config_file [String] The full path of the file. Used in error messages @api public
# File lib/puppet/pops/binder/config/binder_config_checker.rb, line 22 def validate(data, config_file) @unique_layer_names = Set.new() if data.is_a?(Hash) check_top_level(data, config_file) else accept(Issues::CONFIG_IS_NOT_HASH, config_file) end end
Create an instance with a diagnostic producer that will receive the result during validation @param diagnostics [DiagnosticProducer] The producer that will receive the diagnostic @api public
# File lib/puppet/pops/binder/config/binder_config_checker.rb, line 8 def initialize(diagnostics) @diagnostics = diagnostics t = Puppet::Pops::Types @type_calculator = t::TypeCalculator.new() @array_of_string_type = t::TypeFactory.array_of(t::TypeFactory.string()) end