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
484 def initialize
485   super
486   p = self
487   # Issues triggering warning only if --debug is on
488   if Puppet[:debug]
489     p[Issues::EMPTY_RESOURCE_SPECIALIZATION] = :warning
490   else
491     p[Issues::EMPTY_RESOURCE_SPECIALIZATION] = :ignore
492   end
493 
494   # if strict variables are on, an error is raised
495   # if strict variables are off, the Puppet[strict] defines what is done
496   #
497   if Puppet[:strict_variables]
498     p[Issues::UNKNOWN_VARIABLE] = :error
499   elsif Puppet[:strict] == :off
500     p[Issues::UNKNOWN_VARIABLE] = :ignore
501   else
502     p[Issues::UNKNOWN_VARIABLE] = Puppet[:strict]
503   end
504 
505   # Store config issues, ignore or warning
506   p[Issues::RT_NO_STORECONFIGS_EXPORT]    = Puppet[:storeconfigs] ? :ignore : :warning
507   p[Issues::RT_NO_STORECONFIGS]           = Puppet[:storeconfigs] ? :ignore : :warning
508   p[Issues::CLASS_NOT_VIRTUALIZABLE]      = :error
509   p[Issues::NUMERIC_COERCION]             = Puppet[:strict] == :off ? :ignore : Puppet[:strict]
510   p[Issues::SERIALIZATION_DEFAULT_CONVERTED_TO_STRING] = Puppet[:strict] == :off ? :warning : Puppet[:strict]
511   p[Issues::SERIALIZATION_UNKNOWN_CONVERTED_TO_STRING] = Puppet[:strict] == :off ? :warning : Puppet[:strict]
512   p[Issues::SERIALIZATION_UNKNOWN_KEY_CONVERTED_TO_STRING] = Puppet[:strict] == :off ? :warning : Puppet[:strict]
513 end