puppet-lint and 80 characters line limit?

3,413 views
Skip to first unread message

Jakov Sosic

unread,
Aug 20, 2012, 1:24:59 PM8/20/12
to puppet...@googlegroups.com
Hi.

I'm getting lots of warning like this one from puppet-lint:

WARNING: line 67 has more than 80 characters

Now, I don't like warnings, so any idea how should I rewrite this line
for example, to void the warning?

package {'rpmforge-release':
ensure => '0.5.2-2.el6.rf',
provider => 'rpm',
source =>
'http://apt.sw.be/redhat/el6/en/i386/rpmforge/RPMS/rpmforge-release-0.5.2-2.el6.rf.i686.rpm',
}

Is it possible to break links into two lines?






--
Jakov Sosic
www.srce.unizg.hr

llowder

unread,
Aug 20, 2012, 1:44:55 PM8/20/12
to puppet...@googlegroups.com

You have 2 options. One is to use the --no-80chars-check option. This is what I do.
 The other option is to use the line continuation character, which (I think) is a slash ( \ ) followed by a newline.  Keep in mind that any spaces on the next line will be included in the string. I don't like this option because I feel it decreases readability.




--
Jakov Sosic
www.srce.unizg.hr

Tim Mooney

unread,
Aug 20, 2012, 2:21:30 PM8/20/12
to puppet...@googlegroups.com
In regard to: [Puppet Users] puppet-lint and 80 characters line limit?,...:
I asked the same question on May 21st, check the group archives for the
thread and some options. I believe the subject was "linting manifests
with long lines".

My solution:

01:20 PM dogbert ~$ cat ~/.puppet-lintrc
--no-80chars-check

Tim
--
Tim Mooney Tim.M...@ndsu.edu
Enterprise Computing & Infrastructure 701-231-1076 (Voice)
Room 242-J6, IACC Building 701-231-8541 (Fax)
North Dakota State University, Fargo, ND 58105-5164

Jakov Sosic

unread,
Aug 20, 2012, 3:13:53 PM8/20/12
to puppet...@googlegroups.com
On 08/20/2012 08:21 PM, Tim Mooney wrote:

> I asked the same question on May 21st, check the group archives for the
> thread and some options. I believe the subject was "linting manifests
> with long lines".
>
> My solution:
>
> 01:20 PM dogbert ~$ cat ~/.puppet-lintrc --no-80chars-check

Oh, I had old version of puppet-lint which didn't have options at all :D
Now I've built RPM for latest rubygem and it works now.

Thank you.


Jakov Sosic

unread,
Aug 20, 2012, 3:14:24 PM8/20/12
to puppet...@googlegroups.com
On 08/20/2012 07:44 PM, llowder wrote:

> The other option is to use the line continuation character, which (I
> think) is a slash ( \ ) followed by a newline. Keep in mind that any
> spaces on the next line will be included in the string. I don't like
> this option because I feel it decreases readability.

Yeah, I would rather avoid that...


Thanks



Reply all
Reply to author
Forward
0 new messages