Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Perl-Critic CPAN distribution.

Report information
The Basics
Id: 23291
Status: open
Priority: 0/
Queue: Perl-Critic

People
Owner: Nobody in particular
Requestors: mschwern [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: (no value)
Fixed in: (no value)



Subject: Policy suggestion: 80 columns
I'm reading the Perl::Critic man page and it has a tendency to wrap off the right side of my 80 column wide terminal. 80 columns is the defacto minimum terminal width. A policy checking that both the code is 80 columns wide, probably with severity 1, and another to check the POD, probably at severity 2, would be nice. The POD check is higher than the code check since the POD is read by more users and thus more likely to be seen in an 80 column terminal.
Subject: Re: [rt.cpan.org #23291] Policy suggestion: 80 columns
Date: Tue, 14 Nov 2006 19:53:55 -0800 (PST)
To: bug-Perl-Critic [...] rt.cpan.org
From: Jeffrey Thalhammer <jeffrey_thalhammer [...] yahoo.com>
Show quoted text
> A policy checking that both the code is 80 > columns wide, probably with severity 1, and another > to check the POD, probably at severity 2, would be >
nice. Good suggestions. Thus far, we've relied on Perl::Tidy to deal with all the formatting issues. If you have Perl::Tidy installed, Perl::Critic just checks that your code is tidy, using whatever Perl::Tidy settings you already have. If you don't have Perl::Tidy, then you're completely off the hook. But the page-width issue is pretty universal, so I think we could justify creating a specific policy for that. The maximum width would still be configurable, but it would default to 80 (or maybe 78, per Conway). Right now, we're trying to nail things down for a 1.0 release, so this Policy probably won't happen for a couple months. But I will put it on our TODO list. -Jeff Show quoted text
____________________________________________________________________________________ Yahoo! Music Unlimited Access over 1 million songs. http://music.yahoo.com/unlimited
Subject: Re: [rt.cpan.org #23291] Policy suggestion: 80 columns
Date: Wed, 15 Nov 2006 02:18:53 -0800
To: bug-Perl-Critic [...] rt.cpan.org
From: Michael G Schwern <schwern [...] gmail.com>
Jeffrey Thalhammer via RT wrote: Show quoted text
> that. The maximum width would still be configurable, > but it would default to 80 (or maybe 78, per Conway).
Yes, 78.
I have just committed an initial implementation of this policy on the following branch: http://perlcritic.tigris.org/svn/perlcritic/branches/rt23291 I believe it is consistent with the discussion to-date with one exception. It was unclear how we could have different default severities in code vs pod without splitting this into two policies. Therefore, it has been given a single default severity of 2. If there is another way to address this, I would be happy to fix it. At present the __DATA__ section is exempt from the policy checks. Based on some limited testing against real code, an exception for the following items might be considered: - the Name section of Pod - version control strings (ie, $Id: ...$ ) - lines that are a single URL Any suggestions would be appreciated. Thanks, Mark
On Fri Jan 16 14:57:22 2009, MGRIMES wrote: Show quoted text
> exception. It was unclear how we could have different default severities > in code vs pod without splitting this into two policies. Therefore, it
Scratch that. Just committed an update with the two different severity levels.
Subject: Re: [rt.cpan.org #23291] Policy suggestion: 80 columns
Date: Sun, 15 Feb 2009 13:25:03 -0600
To: bug-Perl-Critic [...] rt.cpan.org
From: Elliot Shank <perl [...] galumph.com>
Mark Grimes via RT wrote: Show quoted text
> At present the __DATA__ section is exempt from the policy checks. Based > on some limited testing against real code, an exception for the > following items might be considered: > > - the Name section of Pod
This has to be exempt because its entire content must fit on a single line for things like Module::Build and ExtUtils::MakeMaker to work. Show quoted text
> - version control strings (ie, $Id: ...$ )
Probably. Show quoted text
> - lines that are a single URL
Actually, any line that doesn't contain whitespace has to be exempt.