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
andtarget
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
Website: https://github.com/santana/puppet-cleaner
4 comments:
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.
Hi,
yes, it's possible. By global you mean for the whole file or a whole class or defined type?
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.
I see. I'll code it this weekend ;)
Post a Comment