Monday, May 06, 2013

puppet-cleaner 0.3.0 released

This release adds a new option for ensuring that resource titles are quoted.

By the way, two transformations are done by default and are not optional: the use of ${} for variable interpolation in strings and the replacement of double with single quotes when possible.

The optional transformations are:
  • alignment of fat arrows (=>)
  • removal of unneeded quotes around boolean literals
  • reordering of ensure attribute to the first position
  • declaration of symbolic links by using ensure => link and target attributes
  • conversion of /* */ style comments to #
  • representation of file modes as a 4 digits string
  • use of quotes around resource titles
  • indentation by n spaces
  • removal of unneeded quotes around variables
  • removal of trailing white space
Installation: sudo gem install puppet-cleaner
Website: https://github.com/santana/puppet-cleaner

4 comments:

Unknown said...

Hi,

Is there any possibility of having a "global" fat arrow alignment?
I usually prefer to have the fat aligned throughout the whole manifest, not only withing a class; it makes for easier reading.

Thanks.

Gerardo Santana Gómez Garrido said...

Hi,

yes, it's possible. By global you mean for the whole file or a whole class or defined type?

Unknown said...

I mean for the whole manifest file. I know in some extreme cases there might be big spacing between the keyword and the value, but that shouldn't appear too often.

Gerardo Santana Gómez Garrido said...

I see. I'll code it this weekend ;)