class Puppet::Pops::Validation::ValidatorFactory_4_0
Configures validation suitable for 4.0
Constants
- Issues
Public Instance Methods
checker(diagnostic_producer)
click to toggle source
Produces the checker to use
# File lib/puppet/pops/validation/validator_factory_4_0.rb 10 def checker diagnostic_producer 11 if Puppet[:tasks] 12 require_relative 'tasks_checker' 13 TasksChecker.new(diagnostic_producer) 14 else 15 Checker4_0.new(diagnostic_producer) 16 end 17 end
label_provider()
click to toggle source
Produces the label provider to use
# File lib/puppet/pops/validation/validator_factory_4_0.rb 20 def label_provider 21 Model::ModelLabelProvider.new() 22 end
severity_producer()
click to toggle source
Produces the severity producer to use
Calls superclass method
Puppet::Pops::Validation::Factory#severity_producer
# File lib/puppet/pops/validation/validator_factory_4_0.rb 25 def severity_producer 26 p = super 27 28 # Configure each issue that should **not** be an error 29 # 30 # Validate as per the current runtime configuration 31 p[Issues::RT_NO_STORECONFIGS_EXPORT] = Puppet[:storeconfigs] ? :ignore : :warning 32 p[Issues::RT_NO_STORECONFIGS] = Puppet[:storeconfigs] ? :ignore : :warning 33 34 p[Issues::FUTURE_RESERVED_WORD] = :deprecation 35 36 p[Issues::DUPLICATE_KEY] = Puppet[:strict] == :off ? :ignore : Puppet[:strict] 37 p[Issues::NAME_WITH_HYPHEN] = :error 38 p[Issues::EMPTY_RESOURCE_SPECIALIZATION] = :ignore 39 p[Issues::CLASS_NOT_VIRTUALIZABLE] = :error 40 p 41 end