iwarapter / sonar-puppet

SonarQube plugin for Puppet code.
Other
26 stars 10 forks source link

UnquotedResourceTitleCheck needs fixing for variable based titles #253

Closed petems closed 8 years ago

petems commented 8 years ago

Opened a ticket and talked to the docs team about this: https://tickets.puppetlabs.com/browse/DOCUMENT-468

tl;dr Unquoted title checks should only apply for non variable based titles.

file { foo:    # Noncompliant
  ensure => directory,
}

file { [ foo, bar]:    # Noncompliant
  ensure => directory,
}

However:

file { $foo:   # Compliant
  ensure => directory,
}

file { [$foo, $bar]: # Compliant
  ensure => directory,
}
iwarapter commented 8 years ago

Thanks for your pull request :)

petems commented 8 years ago

Damn, meant to put closes #254 in the PR so this auto-closes, forgot! :smile: