Class: Puppet::Pops::Validation::ValidatorFactory_4_0 Private

Inherits:
Factory show all
Defined in:
lib/puppet/pops/validation/validator_factory_4_0.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Configures validation suitable for 4.0

API:

  • private

Constant Summary collapse

Issues =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

API:

  • private

Issues

Instance Method Summary collapse

Methods inherited from Factory

#diagnostic_producer, #validator

Instance Method Details

#checker(diagnostic_producer) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Produces the checker to use

API:

  • private



9
10
11
# File 'lib/puppet/pops/validation/validator_factory_4_0.rb', line 9

def checker diagnostic_producer
  Checker4_0.new(diagnostic_producer)
end

#label_providerObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Produces the label provider to use

API:

  • private



14
15
16
# File 'lib/puppet/pops/validation/validator_factory_4_0.rb', line 14

def label_provider
  Model::ModelLabelProvider.new()
end

#severity_producerObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Produces the severity producer to use

API:

  • private



19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# File 'lib/puppet/pops/validation/validator_factory_4_0.rb', line 19

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::FUTURE_RESERVED_WORD]          = :deprecation

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