Skip to content

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

Open
@rwaffen

Description

@rwaffen

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

  • 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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions