HEX
Server: Apache
System: Linux hp3-stn-1011028.hostingp3.local 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
User: csh958633 (951153)
PHP: 8.3.30
Disabled: shell_exec,exec,system,popen,set_time_limit
Upload Files
File: //usr/share/ruby/vendor_ruby/puppet/pops/validation/validator_factory_4_0.rb
# Configures validation suitable for 4.0
#
class Puppet::Pops::Validation::ValidatorFactory_4_0 < Puppet::Pops::Validation::Factory
  Issues = Puppet::Pops::Issues

  # Produces the checker to use
  def checker diagnostic_producer
    Puppet::Pops::Validation::Checker4_0.new(diagnostic_producer)
  end

  # Produces the label provider to use
  def label_provider
    Puppet::Pops::Model::ModelLabelProvider.new()
  end

  # Produces the severity producer to use
  def severity_producer
    p = super

    # Configure each issue that should **not** be an error
    #
    # Validate as per the current runtime configuration
    p[Issues::RT_NO_STORECONFIGS_EXPORT]    = Puppet[:storeconfigs] ? :ignore : :warning
    p[Issues::RT_NO_STORECONFIGS]           = Puppet[:storeconfigs] ? :ignore : :warning

    p[Issues::NAME_WITH_HYPHEN]             = :error
    p[Issues::DEPRECATED_NAME_AS_TYPE]      = :error
    p[Issues::EMPTY_RESOURCE_SPECIALIZATION] = :ignore
    p
  end
end