Login
Holy smokes, it works!
authorJeffrey Ryan Thalhammer <jeff@imaginative-software.com>
Mon, 27 Oct 2008 05:44:56 +0000 (05:44 +0000)
committerJeffrey Ryan Thalhammer <jeff@imaginative-software.com>
Mon, 27 Oct 2008 05:44:56 +0000 (05:44 +0000)
commit3be4796c38a41c7768b0e53eac863c35ac2d3969
tree4a5e5aa9c896ac10ac1da2c5b16fc90f8930ce83
parente2fc36b3629f3fc2891a428f52905d592f596f95
Holy smokes, it works!

Using the --warn-about-useless-no-critic option, I found several places
where we were disabling too many policies, or were disabling them
due to bugs that have since been fixed.  This is a pretty cool feature,
but I have reservations about making it into a regular Policy.  Since
we use pattern-matching to select the Policies, it is really easy for
someone to disable a *future* policy.  So I'm not sure I want to force
them to change their '## no critic' markers just because they've upgraded
P::C.

BTW, I discovered that we were using the wrong syntax in some of our
'## no critic' markers:

  ## no critic   'SomePolicy'  # wrong, disables all policies.
  ## no critic   (SomePolicy)  # ok
  ## no critic qw(SomePolicy)  # ok

We should probably emit a warning or something if we come across
a '## no critic' marker that looks wrong.
19 files changed:
bin/perlcritic
lib/Perl/Critic/Exception/AggregateConfiguration.pm
lib/Perl/Critic/Policy/BuiltinFunctions/ProhibitBooleanGrep.pm
lib/Perl/Critic/Policy/BuiltinFunctions/ProhibitReverseSortBlock.pm
lib/Perl/Critic/Policy/BuiltinFunctions/ProhibitUniversalCan.pm
lib/Perl/Critic/Policy/BuiltinFunctions/ProhibitUniversalIsa.pm
lib/Perl/Critic/Policy/InputOutput/ProhibitJoinedReadline.pm
lib/Perl/Critic/Policy/InputOutput/RequireBriefOpen.pm
lib/Perl/Critic/Policy/Miscellanea/RequireRcsKeywords.pm
lib/Perl/Critic/Policy/Modules/ProhibitEvilModules.pm
lib/Perl/Critic/Policy/RegularExpressions/ProhibitEnumeratedClasses.pm
lib/Perl/Critic/Policy/RegularExpressions/ProhibitEscapedMetacharacters.pm
lib/Perl/Critic/Policy/RegularExpressions/ProhibitUnusedCapture.pm
lib/Perl/Critic/Policy/Subroutines/ProhibitManyArgs.pm
lib/Perl/Critic/Policy/Subroutines/RequireArgUnpacking.pm
lib/Perl/Critic/Policy/Variables/ProhibitLocalVars.pm
lib/Perl/Critic/TestUtils.pm
lib/Perl/Critic/Utils/PPIRegexp.pm
lib/Perl/Critic/Violation.pm