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 9 def checker diagnostic_producer 10 if Puppet[:tasks] 11 require_relative 'tasks_checker' 12 TasksChecker.new(diagnostic_producer) 13 else 14 Checker4_0.new(diagnostic_producer) 15 end 16 end
label_provider()
click to toggle source
Produces the label provider to use
# File lib/puppet/pops/validation/validator_factory_4_0.rb 19 def label_provider 20 Model::ModelLabelProvider.new() 21 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 24 def severity_producer 25 p = super 26 27 # Configure each issue that should **not** be an error 28 # 29 # Validate as per the current runtime configuration 30 p[Issues::RT_NO_STORECONFIGS_EXPORT] = Puppet[:storeconfigs] ? :ignore : :warning 31 p[Issues::RT_NO_STORECONFIGS] = Puppet[:storeconfigs] ? :ignore : :warning 32 33 p[Issues::FUTURE_RESERVED_WORD] = :deprecation 34 35 p[Issues::DUPLICATE_KEY] = Puppet[:strict] == :off ? :ignore : Puppet[:strict] 36 p[Issues::NAME_WITH_HYPHEN] = :error 37 p[Issues::EMPTY_RESOURCE_SPECIALIZATION] = :ignore 38 p[Issues::CLASS_NOT_VIRTUALIZABLE] = :error 39 p 40 end