Skip to content

When linting with interpolation, triggers false-positive and adds spaces. Repeatedly. #217

@nelsonjr

Description

@nelsonjr

Describe the Bug

When linting a file with a resource with interpolation, it flags it as missing spaces and adds it—every time.

Expected Behavior

Properly detect if spaces are needed, and if run with --fix to update it, but not add more spaces after that.

Steps to Reproduce

  1. Lint a file with this resource:
  apache::vhost { 'test-oidc':
    custom_fragment => @(EOT)
        OIDCProviderMetadataURL xxxxxxxxxxxxxxxxxxxxxxxx
        OIDCClientID xxxxxxxxxxxxxxxxxxxxxxxx
        OIDCClientSecret xxxxxxxxxxxxxxxxxxxxxxxx
    | EOT
  }
  1. Observe that every time, the OIDCProviderMetadataURL line has more spaces. After a few invocations of puppet-lint --fix the resource will look like this:
  apache::vhost { 'test-oidc':
    custom_fragment => @(EOT)
                                      OIDCProviderMetadataURL xxxxxxxxxxxxxxxxxxxxxxxx
        OIDCClientID xxxxxxxxxxxxxxxxxxxxxxxx
        OIDCClientSecret xxxxxxxxxxxxxxxxxxxxxxxx
    | EOT
  }

Environment

  • Version 4.2.4
  • Platform Ubuntu 22.04
  • Puppet 7

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions