class Puppet::Pops::Evaluator::Runtime3Support::SeverityProducer

Configure the severity of failures

Constants

Issues

Public Class Methods

new() click to toggle source
    # File lib/puppet/pops/evaluator/runtime3_support.rb
485 def initialize
486   super
487   p = self
488   # Issues triggering warning only if --debug is on
489   if Puppet[:debug]
490     p[Issues::EMPTY_RESOURCE_SPECIALIZATION] = :warning
491   else
492     p[Issues::EMPTY_RESOURCE_SPECIALIZATION] = :ignore
493   end
494 
495   # if strict variables are on, an error is raised
496   # if strict variables are off, the Puppet[strict] defines what is done
497   #
498   if Puppet[:strict_variables]
499     p[Issues::UNKNOWN_VARIABLE] = :error
500   elsif Puppet[:strict] == :off
501     p[Issues::UNKNOWN_VARIABLE] = :ignore
502   else
503     p[Issues::UNKNOWN_VARIABLE] = Puppet[:strict]
504   end
505 
506   # Store config issues, ignore or warning
507   p[Issues::RT_NO_STORECONFIGS_EXPORT]    = Puppet[:storeconfigs] ? :ignore : :warning
508   p[Issues::RT_NO_STORECONFIGS]           = Puppet[:storeconfigs] ? :ignore : :warning
509   p[Issues::CLASS_NOT_VIRTUALIZABLE]      = :error
510   p[Issues::NUMERIC_COERCION]             = Puppet[:strict] == :off ? :ignore : Puppet[:strict]
511   p[Issues::SERIALIZATION_DEFAULT_CONVERTED_TO_STRING] = Puppet[:strict] == :off ? :warning : Puppet[:strict]
512   p[Issues::SERIALIZATION_UNKNOWN_CONVERTED_TO_STRING] = Puppet[:strict] == :off ? :warning : Puppet[:strict]
513   p[Issues::SERIALIZATION_UNKNOWN_KEY_CONVERTED_TO_STRING] = Puppet[:strict] == :off ? :warning : Puppet[:strict]
514 end