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

Ignore cron commands over 80 characters long #198

Closed
kormoc opened this issue Apr 22, 2013 · 5 comments
Closed

Ignore cron commands over 80 characters long #198

kormoc opened this issue Apr 22, 2013 · 5 comments

Comments

@kormoc
Copy link

kormoc commented Apr 22, 2013

Spacing, Indentation & Whitespace

Should not exceed an 80 character line width
An exception has been made for source => 'puppet://...' lines as splitting these over multiple lines decreases the readability of the manifests.

I would argue that command => '' should also be excluded, as paths can be really long and can't be shortened without breaking the string abnormally

@vStone
Copy link
Contributor

vStone commented Apr 23, 2013

You can easily put long commands in a template. That also resolves the quote-madness that sometimes arises.

@kormoc
Copy link
Author

kormoc commented Apr 25, 2013

command => template("my_module/command.erb") ?

That seems overly complex for a single line that may just be 90 characters, but fair 'nuff

@ghoneycutt
Copy link
Contributor

80 char limit sadly snuck into the style guide, which is why there is a check in puppet-lint. It only triggers a WARNING and is easily disabled. Highly recommend just disabling that check on your systems, though I do not believe that lint should have exceptions as it is just responding to the style guide.

@dbeckham
Copy link
Contributor

I generally do disable the 80 char limit for automated testing, but it is a good lint check for cases when you might have accidentally created a really long require => [File[foo], Package[bar], ...]. Quite a few exec related resource attributes just can't be broken up and templates for one liners that happen to be over 80 chars is just another work around. I have no idea how easy it would be, or if it would just create config complexity, but being able to specify resource attributes to ignore would mean you could tailor it to your environment.

@rodjek
Copy link
Owner

rodjek commented Mar 4, 2014

As pointed out earlier in this issue, the recommended work around is to put it into a template or disable the check. I don't want to start making exceptions for every long line as it starts a horrible trend of people asking for exceptions for things like the authorized_key type so they can embed a 4096 character key in their manifests and so on.

@rodjek rodjek closed this as completed Mar 4, 2014
ekohl pushed a commit to ekohl/puppet-lint that referenced this issue Jul 5, 2024
Fix function call name token type in function_indexes method
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

5 participants