module Puppet::Pops::Issues

Constants

APPENDS_DELETES_NO_LONGER_SUPPORTED
BAD_ARRAY_SLICE_ARITY
BAD_COLLECTION_SLICE_TYPE
BAD_FLOAT_SLICE_ARITY
BAD_FLOAT_SLICE_TYPE
BAD_HASH_SLICE_ARITY
BAD_INTEGER_SLICE_ARITY
BAD_INTEGER_SLICE_TYPE
BAD_NOT_UNDEF_SLICE_TYPE
BAD_SLICE_KEY_TYPE
BAD_STRING_SLICE_ARITY
BAD_STRING_SLICE_KEY_TYPE
BAD_STRING_SLICE_TYPE
BAD_TYPE_SLICE_ARITY
BAD_TYPE_SLICE_TYPE
BAD_TYPE_SPECIALIZATION
CAPTURES_REST_NOT_LAST
CAPTURES_REST_NOT_SUPPORTED
CATALOG_OPERATION_NOT_SUPPORTED_WHEN_SCRIPTING
CLASS_NOT_VIRTUALIZABLE
COMPARISON_NOT_POSSIBLE
CROSS_SCOPE_ASSIGNMENT
DISCONTINUED_IMPORT
DIV_BY_ZERO
DUPLICATE_ATTRIBUTE
DUPLICATE_DEFAULT
DUPLICATE_KEY
DUPLICATE_PARAMETER
DUPLICATE_TITLE
EMPTY_HEREDOC_SYNTAX_SEGMENT

TODO_HEREDOC

EMPTY_RESOURCE_SPECIALIZATION
EMPTY_STRING_TITLE_AT
EPP_INTERNAL_ERROR
EPP_UNBALANCED_COMMENT
EPP_UNBALANCED_EXPRESSION
EPP_UNBALANCED_TAG
EXPRESSION_NOT_SUPPORTED_WHEN_COMPILING
EXPRESSION_NOT_SUPPORTED_WHEN_SCRIPTING
FEATURE_NOT_SUPPORTED_WHEN_SCRIPTING
FUTURE_RESERVED_WORD
HEREDOC_DIRTY_MARGIN
HEREDOC_EMPTY_ENDTAG
HEREDOC_INVALID_ESCAPE
HEREDOC_INVALID_SYNTAX
HEREDOC_MULTIPLE_AT_ESCAPES
HEREDOC_UNCLOSED_PARENTHESIS
HEREDOC_WITHOUT_END_TAGGED_LINE
HEREDOC_WITHOUT_TEXT
HIERA_BACKEND_MULTIPLY_DEFINED
HIERA_DATA_PROVIDER_FUNCTION_NOT_FOUND
HIERA_DEFAULT_HIERARCHY_NOT_IN_MODULE
HIERA_DEFAULT_OPTION_RESERVED_BY_PUPPET
HIERA_HIERARCHY_NAME_MULTIPLY_DEFINED
HIERA_INTERPOLATION_ALIAS_NOT_ENTIRE_STRING
HIERA_INTERPOLATION_METHOD_SYNTAX_NOT_ALLOWED
HIERA_INTERPOLATION_UNKNOWN_INTERPOLATION_METHOD
HIERA_MISSING_DATA_PROVIDER_FUNCTION
HIERA_MULTIPLE_DATA_PROVIDER_FUNCTIONS
HIERA_MULTIPLE_DATA_PROVIDER_FUNCTIONS_IN_DEFAULT
HIERA_MULTIPLE_LOCATION_SPECS
HIERA_NO_PROVIDER_FOR_BACKEND
HIERA_OPTION_RESERVED_BY_PUPPET
HIERA_UNDEFINED_VARIABLE
HIERA_UNSUPPORTED_VERSION
HIERA_UNSUPPORTED_VERSION_IN_GLOBAL
HIERA_V3_BACKEND_NOT_GLOBAL
HIERA_V3_BACKEND_REPLACED_BY_DATA_HASH
HIERA_VERSION_3_NOT_GLOBAL
IDEM_EXPRESSION_NOT_LAST
IDEM_NOT_ALLOWED_LAST
ILLEGAL_ASSIGNMENT

Assignment can only be made to certain types of left hand expressions such as variables.

ILLEGAL_ASSIGNMENT_CONTEXT

Assignment can only be made to certain types of left hand expressions such as variables.

ILLEGAL_ASSIGNMENT_VIA_INDEX

When indexed assignment ($x[]=) is allowed, the leftmost expression must be a variable expression.

ILLEGAL_ATTRIBUTE_APPEND

Appending to attributes is only allowed in certain types of resource expressions.

ILLEGAL_BOM
ILLEGAL_CLASSREF

In case a model is constructed programmatically, it must create valid type references.

ILLEGAL_CLASS_REFERENCE
ILLEGAL_DEFINITION_LOCATION
ILLEGAL_DEFINITION_NAME
ILLEGAL_EPP_PARAMETERS
ILLEGAL_EXPRESSION

Issues when an expression is used where it is not legal. E.g. an arithmetic expression where a hostname is expected.

ILLEGAL_FULLY_QUALIFIED_CLASS_REFERENCE
ILLEGAL_FULLY_QUALIFIED_NAME
ILLEGAL_HOSTCLASS_NAME
ILLEGAL_HOSTNAME_CHARS

A hostname may only contain letters, digits, '_', '-', and '.'.

ILLEGAL_HOSTNAME_INTERPOLATION

A hostname may only contain letters, digits, '_', '-', and '.'.

ILLEGAL_INDEXED_ASSIGNMENT

In certain versions of Puppet it may be allowed to assign to a not already assigned key in an array or a hash. This is an optional validation that may be turned on to prevent accidental mutation.

ILLEGAL_MULTI_ASSIGNMENT_SIZE
ILLEGAL_NAME
ILLEGAL_NAME_OR_BARE_WORD
ILLEGAL_NODE_INHERITANCE
ILLEGAL_NUMBER
ILLEGAL_NUMERIC_ASSIGNMENT

Assignment cannot be made to numeric match result variables

ILLEGAL_NUMERIC_PARAMETER

parameters cannot have numeric names, clashes with match result variables

ILLEGAL_NUMERIC_VAR_NAME
ILLEGAL_OVERRIDDEN_TYPE
ILLEGAL_PARAM_NAME
ILLEGAL_QUERY_EXPRESSION

Issues when an expression is used illegally in a query. query only supports == and !=, and not <, > etc.

ILLEGAL_REASSIGNMENT

Variables are immutable, cannot reassign in the same assignment scope

ILLEGAL_REGEXP_TYPE_MAPPING
ILLEGAL_RELATIONSHIP_OPERAND_TYPE
ILLEGAL_RESERVED_ASSIGNMENT

Variables facts and trusted

ILLEGAL_RESOURCE_SPECIALIZATION
ILLEGAL_RESOURCE_TYPE
ILLEGAL_SINGLE_TYPE_MAPPING
ILLEGAL_TITLE_TYPE_AT
ILLEGAL_TOP_CONSTRUCT_LOCATION
ILLEGAL_TYPE_SPECIALIZATION
ILLEGAL_UNICODE_ESCAPE
ILLEGAL_VARIABLE_EXPRESSION

Issues when a variable is not a NAME

ILLEGAL_VAR_NAME
INVALID_DECIMAL_NUMBER
INVALID_HEX_NUMBER
INVALID_OCTAL_NUMBER
LOADER_FAILURE
MATCH_NOT_REGEXP
MATCH_NOT_STRING
MISSING_MULTI_ASSIGNMENT_KEY
MISSING_MULTI_ASSIGNMENT_VARIABLE
MISSING_REQUIRED_PARAMETER
MISSING_TITLE
MISSING_TITLE_AT
MULTIPLE_ATTRIBUTES_UNFOLD
NAME_WITH_HYPHEN

This is allowed (3.1) and has not yet been deprecated. @todo configuration

NOT_ABSOLUTE_TOP_LEVEL
NOT_A_FILE
NOT_CATALOG_TYPE
NOT_NUMERIC
NOT_RVALUE

Some expressions/statements may not produce a value (known as right-value, or rvalue). This may vary between puppet versions.

NOT_TOP_LEVEL

A class, definition, or node may only appear at top level or inside other classes @todo Is this really true for nodes? Can they be inside classes? Isn't that too late? @api public

NOT_VIRTUALIZEABLE

If an attempt is made to make a resource default virtual or exported.

NO_INPUT_TO_LEXER
NO_SUCH_FILE_OR_DIRECTORY
NUMERIC_COERCION
NUMERIC_OVERFLOW
OPERATOR_NOT_APPLICABLE

For non applicable operators (e.g. << on Hash).

OPERATOR_NOT_APPLICABLE_WHEN
REQUIRED_PARAMETER_AFTER_OPTIONAL
RESERVED_PARAMETER
RESERVED_TYPE_NAME
RESERVED_WORD
RESOURCE_WITHOUT_TITLE
RESULT_IS_INFINITY
RT_NO_STORECONFIGS

This is a runtime issue - storeconfigs must be on in order to collect exported. This issue should be set to :ignore when just checking syntax. @todo should be a :warning by default

RT_NO_STORECONFIGS_EXPORT

This is a runtime issue - storeconfigs must be on in order to export a resource. This issue should be set to :ignore when just checking syntax. @todo should be a :warning by default

RUNTIME_ERROR
SERIALIZATION_DEFAULT_CONVERTED_TO_STRING
SERIALIZATION_ENDLESS_RECURSION
SERIALIZATION_UNKNOWN_CONVERTED_TO_STRING
SERIALIZATION_UNKNOWN_KEY_CONVERTED_TO_STRING
SYNTAX_ERROR
TASK_MISSING_BOLT
TASK_OPERATION_NOT_SUPPORTED_WHEN_COMPILING
TYPE_MISMATCH
UNCLOSED_MLCOMMENT
UNCLOSED_QUOTE
UNKNOWN_FUNCTION
UNKNOWN_RESOURCE
UNKNOWN_RESOURCE_PARAMETER
UNKNOWN_RESOURCE_TYPE
UNKNOWN_TASK
UNKNOWN_VARIABLE
UNMATCHED_SELECTOR
UNRECOGNIZED_ESCAPE
UNSUPPORTED_EXPRESSION

Issues when expressions that are not implemented or activated in the current version are used.

UNSUPPORTED_OPERATOR

For unsupported operators (e.g. += and -= in puppet 4).

UNSUPPORTED_OPERATOR_IN_CONTEXT

For operators that are not supported in specific contexts (e.g. '* =>' in resource defaults)

UNSUPPORTED_RANGE

When an attempt is made to use multiple keys (to produce a range in Ruby - e.g. $arr). This is not supported in 3x, but it allowed in 4x.

VAR_WITH_HYPHEN

When a variable name contains a hyphen and these are illegal. It is possible to control if a hyphen is legal in a name or not using the setting TODO @todo describe the setting @api public @todo configuration if this is error or warning

Private Class Methods

hard_issue(issue_code, *args, &block) click to toggle source

Creates a non demotable issue. @see Issue.issue

    # File lib/puppet/pops/issues.rb
128 def self.hard_issue(issue_code, *args, &block)
129   result = Issue.new(issue_code, *args, &block)
130   result.demotable = false
131   result
132 end
issue(issue_code, *args, &block) click to toggle source

Defines an issue with the given `issue_code`, additional required parameters, and a block producing a message. The block is evaluated in the context of a MessageData which provides convenient access to all required arguments via accessor methods. In addition to accessors for specified arguments, these are also available:

  • `label` - a `LabelProvider` that provides human understandable names for model elements and production of article (a/an/the).

  • `semantic` - the model element for which the issue is reported

@param issue_code [Symbol] the issue code for the issue used as an identifier, should be the same as the constant

the issue is bound to.

@param args [Symbol] required arguments that must be passed when formatting the message, may be empty @param block [Proc] a block producing the message string, evaluated in a MessageData scope. The produced string

should not end with a period as additional information may be appended.

@see MessageData @api public

    # File lib/puppet/pops/issues.rb
121 def self.issue(issue_code, *args, &block)
122   Issue.new(issue_code, *args, &block)
123 end