Thanks for your feedback Rich. David RACODON Freelance QA Consultant LinkedIn <https://ch.linkedin.com/pub/david-racodon/11/62/283> | Twitter <https://twitter.com/davidracodon>
On Sun, Aug 16, 2015 at 4:12 AM, Rich Burroughs <r...@richburroughs.com> wrote: > Hi David, > > My guess is that this is because of the guideline in section 9.1 that all > resource titles be quoted. So that is the area where it should be done for > consistency. Otherwise if you have a standalone variable elsewhere in your > manifest, it's not necessary to quote it. > > Generally the impetus behind the suggestions in the style guide is to make > the code as readable as possible. That partly means being consistent (like > quoting all titles), and keeping things as simple as possible (not quoting > standalone variables, and using single quotes for strings unless there is a > variable being interpolated, etc.). > > I'm pretty sure I've written code where there were unquoted variables in > titles and it worked fine (in Puppet 3.x anyway). You aren't required to > use all of the formatting in the style guide, and if you're using > puppet-lint you can disable specific checks you don't want to use. > > > Rich > > On Sat, Aug 15, 2015 at 7:23 AM David Racodon <david.raco...@gmail.com> > wrote: > >> Hi, >> >> The Puppet Language Style Guide states at >> https://docs.puppetlabs.com/guides/style_guide.html#quoting that >> "Variables standing by themselves should not be quoted, unless they are a >> resource title". So, it means that you should write: >> >> file { "${foo}": >>> ... >>> } >> >> >> instead of: >> >> file { $foo: >>> ... >>> } >> >> >> correct? >> >> If so, could you please provide some explanations on why it is >> recommended to quote variables standing by themselves in resource titles >> and only there? >> >> Thank you >> >> Regards, >> >> David RACODON >> Freelance QA Consultant >> LinkedIn <https://ch.linkedin.com/pub/david-racodon/11/62/283> | Twitter >> <https://twitter.com/davidracodon> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Puppet Users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to puppet-users+unsubscr...@googlegroups.com. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/puppet-users/c4f51d65-1fb4-4973-a47f-60de2adf24a2%40googlegroups.com >> <https://groups.google.com/d/msgid/puppet-users/c4f51d65-1fb4-4973-a47f-60de2adf24a2%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> For more options, visit https://groups.google.com/d/optout. >> > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to puppet-users+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/puppet-users/CAPGcbtCqCwda6_soJ_jCJAYRdgWCUxGeQO4Kog7O9zPDpyChoQ%40mail.gmail.com > <https://groups.google.com/d/msgid/puppet-users/CAPGcbtCqCwda6_soJ_jCJAYRdgWCUxGeQO4Kog7O9zPDpyChoQ%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/CACTFSAhxc%3DCkAFTy2PxQ7QRqve0rE5pyhNeSfUmiaLsR-6Wzhg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.