Login
Created a new Policy to prohibit an unrestricted ## no critic.
authorJeffrey Ryan Thalhammer <jeff@imaginative-software.com>
Sun, 28 Sep 2008 02:32:42 +0000 (02:32 +0000)
committerJeffrey Ryan Thalhammer <jeff@imaginative-software.com>
Sun, 28 Sep 2008 02:32:42 +0000 (02:32 +0000)
commit05e2d404fa2d5067c98d27b74731a0fda15d6534
treead712dbb4c9062f3557b9c037e88fe98f9c43879
parent78afb6d4fd5d00859f1a69f4a7d7529bfde91e8b
Created a new Policy to prohibit an unrestricted ## no critic.
I was able to implement this as a policy rather than a
command-line switch by adding a method to the Policy
base class that indicates whether the policy can be disabled.

I can think of a few other applications for this new method,
such as policy that prohibits you from disabling certain other
policies.  For example, shops using Test::Perl::Critic
may wish to prevent unruly developers from locally disabling
some policies that they feel are irrefutable.  I realize
that it isn't very kind, but I've been in situations where I
wished that I could do that.
Changes
TODO.pod
lib/Perl/Critic.pm
lib/Perl/Critic/Policy.pm
lib/Perl/Critic/Policy/Miscellanea/ProhibitUnrestrictedNoCritic.pm [new file with mode: 0644]
t/03_pragmas.t
t/Miscellanea/ProhibitUnrestrictedNoCritic.run [new file with mode: 0644]