Ovid wrote:
--- Adam Kennedy <[EMAIL PROTECTED]> wrote:
So I'd like to propose the following for inclusion.

Metric: consistent_newlines

The distribution is awarded a point IF for ALL text files within the distribution EACH file contains EITHER exclusively unix newlines OR exclusively Win32 newlines.

Sounds like a good idea, but what about strings?  You'd need to mask
those out prior to the test, wouldn't you?  And if they were multi-line
strings, you'd need to mask 'em out with the right type of ending
(unless PPI were being used).

As I mentioned to Jeff, PPI is out for this one.

Actually, until I can make PPI survive a full CPAN run, PPI is out for Kwalitee algother.

At the moment it can handle the .pm subset just (30,000 files) but chokes on the expanded "perl files" (.pm, .pl, .t, .PL) (100,000 files).

There's obviously leaks or something I am missing (although the newest List::Util and List::MoreUtil might help) but until I can track them down, PPI isn't an option yet.

As for string, I'm not sure why any strings you break the newline pattern... a normal string will have a \n or an excaped \012 or \015 if they want to be explicit, and multilines get localised I imagine.

I don't thing it will be a problem unless somehow someone injects "real" broken newlines into a string, which probably doesn't deserve the point anyway, even if it somehow works.

But I might just be missing something in your question

Adam K

Reply via email to