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

ssh_key can't be broken up by \ #58

Closed
rkhatibi opened this issue Jan 16, 2012 · 4 comments
Closed

ssh_key can't be broken up by \ #58

rkhatibi opened this issue Jan 16, 2012 · 4 comments

Comments

@rkhatibi
Copy link

At least I haven't figured out how to yet. What I've found works is adding an exception into whitespace.rb.

  # SHOULD NOT exceed an 80 character line width
  unless line =~ /puppet:\/\// || line =~ /AAAAB3NzaC1/

AAAAB3NzaC1 should match either an RSA or DSA key.

@rodjek
Copy link
Owner

rodjek commented Jan 17, 2012

Honestly, I think for readability you should be putting the content of your SSH keys into templates. There's a significant difference between a puppet:// uri that is 90 chars and a 500+ char SSH key.

@rkhatibi
Copy link
Author

I think you're right in that we can't handle all bits of data in puppet-lint. However I'm not sure putting everything in a template or redirecting through variables makes any more sense... though I suppose if we're aiming for separating data from code it does make more sense. Perhaps I'll patch my local copy to run the length check on files in ./lib/ which is code and skip manifests for now.

@rodjek
Copy link
Owner

rodjek commented Jan 17, 2012

The whole point of puppet-lint as I see it is to provide you with hints to keep your manifests clean, consistent and above all, readable. Enforcing the separation of code and data is a big part of that IMHO.

I'm open to adjusting the checks as we've done for puppet:// URIs (splitting these into multiple lines would hurt readability rather than enhance it) but in this case, I really feel that moving the contents of the key out of the manifest is the way to go.

Counter arguments are welcome though :)

Also, there's no need to patch puppet-lint locally, you can disable the 80char check with the --no-80chars-check flag.

@rkhatibi
Copy link
Author

I spent some time this weekend cleaning up my manifests and have come around to your point of view. Thanks for taking the time to talk me through it. Marking this closed.

ekohl pushed a commit to ekohl/puppet-lint that referenced this issue Oct 19, 2022
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