Critic stats

Beatnik on 2006-09-07T22:32:23

Just a raw dump of Perl::Critics output.. Considering this is 11k lines of code, I'm not doing THAT bad :)

"die" used instead of "croak"  = 6
"unless" block used  = 1
"warn" used instead of "carp"  = 24
@ISA used instead of "use base"  = 16
AUTOLOAD method declared  = 14
Ambiguous name for variable or subroutine  = 19
Bareword file handle opened  = 1
Builtin function called with parens  = 226
Capture variable used outside conditional  = 5
Code before warnings are enabled  = 6736
Expression form of "eval"  = 16
File handle for "print" is not braced  = 1
Heredoc terminator must be quoted  = 5
Loop iterator is not lexical  = 6
Magic punctuation variable used  = 21
Missing "BUGS AND LIMITATIONS" section in POD  = 67
Missing "CONFIGURATION AND ENVIRONMENT" section in POD  = 67
Missing "DEPENDENCIES" section in POD  = 67
Missing "DIAGNOSTICS" section in POD  = 67
Missing "INCOMPATIBILITIES" section in POD  = 67
Missing "LICENSE AND COPYRIGHT" section in POD  = 67
Missing "SUBROUTINES/METHODS" section in POD  = 67
Missing "SYNOPSIS" section in POD  = 4
Mixed high and low-precedence booleans  = 2
Mixed-case subroutine name  = 2
Package variable declared or used  = 8
Postfix control "if" used  = 297
Postfix control "unless" used  = 16
Pragma "constant" used  = 23
Quotes used with a noisy string  = 39
Quotes used with an empty string  = 171
RCS keywords $HeadURL$ not found  = 13
RCS keywords $Id$ not found  = 67
RCS keywords $Revision$, $HeadURL$, $Date$ not found  = 54
RCS keywords $Revision$, $Source$, $Date$ not found  = 54
RCS keywords $Source$ not found  = 13
Regular expression without "/m" flag  = 448
Regular expression without "/x" flag  = 448
String delimiter used with "split"  = 16
Subroutine called with "&" sigil  = 2
Subroutine does not end with "return"  = 37
Subroutine name is a homonym for builtin function  = 3
Subroutine with high complexity score  = 21
Symbols are exported by default  = 2
Two-argument "open" used  = 1
Useless interpolation of literal string  = 643
Variable declared in conditional statement  = 53
Warnings disabled  = 14


SVN version?

jjore on 2006-09-07T22:48:49

You must be running an SVN version. I don't think the $Id$/$blah$/$blablah$ errors are in production yet.

Or am I wrong?

Are you also using emacs? There's an extras/perltidy.el minor mode to get it integrated right into your editor.

Re:SVN version?

Beatnik on 2006-09-08T08:07:12

I'm running SVN. I actually do have quite a bit of legacy tags from my CVS era. Updating those is pretty low priority to me. I think those critics are on severity level 1 or 2 so I didn't cover those yet. I first fixed what was really bad :) I'm not using emacs but I switch a bit between vi, mc and whatever X editor is handy at the moment. I'm reading Perl Hacks and there are a few things I'll probably add so my code gets critized and tidied before I commit it tho.