Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2 space softabs does not always make sense when aligning array endings #213

Closed
bodepd opened this issue Aug 7, 2013 · 1 comment
Closed

Comments

@bodepd
Copy link

bodepd commented Aug 7, 2013

I have an example of a valid puppet manifest that failed puppet-lint b/c it has an odd number of spaces.

  require                   => [
                                Keystone_user[$username],
                                Keystone_user[$alt_username],
                                Glance_image[$image_name],
                                Quantum_network[$public_network_name],
                               ], # THIS LINE CAUSES THE FAILURE

In this example, I expect the '[' and ']' should be in the same column, but whether it requires an odd or even number of spaces depends on the number of characters of the longest parameter name for the resource.

@rodjek
Copy link
Owner

rodjek commented Jan 5, 2014

Personally, I would format this like

  require                   => [
    Keystone_user[$username],
    Keystone_user[$alt_username],
    Glance_image[$image_name],
    Quantum_network[$public_network_name],
  ],

Keeping each indent level at 2 spaces makes everything neater IMHO

@rodjek rodjek closed this as completed Jan 5, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants