Closed rwaffen closed 3 days ago
In a plan we do a case on the return of a task and evaluate the return type. Puppet lint does not like this and says this is a unquoted string in case.
A data type should be valid in case statements.
$result = run_task('service::linux', $target, action => 'status', name => 'postfix') $final = case $result { Error: { $result.details['result_set'] } default: { $result } }
Ubuntu 22.04
ruby 2.7.8p225
puppet 7.31.0
puppet-lint (4.2.4)
puppet-lint-absolute_classname-check (4.0.0)
puppet-lint-anchor-check (2.0.0)
puppet-lint-file_ensure-check (2.0.0)
puppet-lint-leading_zero-check (2.0.0)
puppet-lint-lookup_in_parameter-check (2.0.0)
puppet-lint-manifest_whitespace-check (0.3.0)
puppet-lint-optional_default-check (2.0.0)
puppet-lint-param-docs (2.0.0)
puppet-lint-param-types (2.0.0)
puppet-lint-params_empty_string-check (2.0.0)
puppet-lint-resource_reference_syntax (2.0.0)
puppet-lint-strict_indent-check (3.0.0)
puppet-lint-topscope-variable-check (2.0.0)
puppet-lint-trailing_comma-check (2.0.0)
puppet-lint-unquoted_string-check (3.0.0)
puppet-lint-variable_contains_upcase (2.0.0)
puppet-lint-version_comparison-check (2.0.0)
voxpupuli-puppet-lint-plugins (5.0.0)
sry, wrong repo. this is for the plugin. will be handled in https://github.com/voxpupuli/puppet-lint-unquoted_string-check/issues/27
Describe the Bug
In a plan we do a case on the return of a task and evaluate the return type. Puppet lint does not like this and says this is a unquoted string in case.
Expected Behavior
A data type should be valid in case statements.
Steps to Reproduce
Environment
Ubuntu 22.04
ruby 2.7.8p225
puppet 7.31.0
puppet-lint (4.2.4)
puppet-lint-absolute_classname-check (4.0.0)
puppet-lint-anchor-check (2.0.0)
puppet-lint-file_ensure-check (2.0.0)
puppet-lint-leading_zero-check (2.0.0)
puppet-lint-lookup_in_parameter-check (2.0.0)
puppet-lint-manifest_whitespace-check (0.3.0)
puppet-lint-optional_default-check (2.0.0)
puppet-lint-param-docs (2.0.0)
puppet-lint-param-types (2.0.0)
puppet-lint-params_empty_string-check (2.0.0)
puppet-lint-resource_reference_syntax (2.0.0)
puppet-lint-strict_indent-check (3.0.0)
puppet-lint-topscope-variable-check (2.0.0)
puppet-lint-trailing_comma-check (2.0.0)
puppet-lint-unquoted_string-check (3.0.0)
puppet-lint-variable_contains_upcase (2.0.0)
puppet-lint-version_comparison-check (2.0.0)
voxpupuli-puppet-lint-plugins (5.0.0)