puppetlabs / puppet-lint

Check that your Puppet manifests conform to the style guide

Home Page:https://puppetlabs.github.io/puppet-lint/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

slash_comments incorrectly fix "puppet:///file"

zombiedk opened this issue · comments

Describe the Bug

if you for a file have a source that uses puppet and you are using single quots it will conver it to comments

Expected Behavior

it should not make any changes to it

Steps to Reproduce

  file { '/etc/ssh/sshrc':
    mode   => 'a+rx',
    source => 'puppet:///modules/profile/auth/ssh/sshrc',
  }
puppet-lint --fix file.pp
FIXED: // comment found on line 57 (check: slash_comments)
FIXED: unquoted resource title on line 57 (check: unquoted_resource_title)
FIXED: double quoted string containing no variables on line 62 (check: double_quoted_strings)

  file { '/etc/ssh/sshrc':
    mode   => 'a+rx',
    source => ''puppet':#/modules/profile/auth/ssh/sshrc',
}

but if you are using dubble quots there is no proble

  file { '/etc/ssh/sshrc':
    mode   => 'a+rx',
    source => "puppet:///modules/profile/auth/ssh/sshrc",
  }

Environment

  • Version [3.3.0]
  • Platform [Ubuntu 22.10]

Looks like this is a built-in plugin.

We will investigate and get back to you!