puppetlabs / puppet-lint

Check that your Puppet manifests conform to the style guide
https://puppetlabs.github.io/puppet-lint/
MIT License
18 stars 12 forks source link

Bug: Type in a Case is counted as unquoted string #212

Closed rwaffen closed 3 days ago

rwaffen commented 3 days ago

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

$result = run_task('service::linux', $target, action => 'status', name => 'postfix')

$final = case $result {
  Error: { $result.details['result_set'] }
  default: { $result }
}

Environment

rwaffen commented 3 days ago

sry, wrong repo. this is for the plugin. will be handled in https://github.com/voxpupuli/puppet-lint-unquoted_string-check/issues/27