On 6/25/07, Paul Cochrane via RT <[EMAIL PROTECTED]> wrote:
To be able to attack this ticket properly, we need to be able to run at
least a subset of the perlcritic tests with 'make test' alongside the
other coding standards tests, so as to ensure that any broken windows
do not remain so for very long.  Therefore, I propose to change the
functionality of the t/codingstd/perlcritic.t test slightly so as to
run only those tests which have currently been "cleaned up" by default,
and to run all perlcritic policies by passing the flag '--allpolicies'
to the test script.  We can then incrementally move cleaned up policies
into the default list of policies and hence slowly increase our perl
coding standards testing coverage.  The attached patch implements this,
and sorts the output of the '--list' option so as to make its output
more readable.

Comments most definitely welcome!  If there are no problems with this,
I'll commit the patch, and add t/codingstd/perlcritic.t to the coding
standards section of the test harness.

i have some suggestions for your patch.

let me start with a side point, sorry for the early tangent. why isn't
perlcritic.t using a Getopt:: module--it should be. that'd be a good
cage task, and would make one of my suggestions easier to implement.

arranging the %policies as a HoH would make it easier to add groupings
as we please. something like:
 my %policies = ( default => { ... }, extra => { ... }, );

have one flag to select which group of policies to run. the special
value 'all' would run all groups. 'default' would be the default. for
example:
 perl t/codingstd/perlcritic.t --group=extra

i should have started with this: it's a good idea. the set of perl
coding standard tests that should be passing consistently should be
run by default. and we should not have false positives (tests expected
to fail) in the trunk for any length of time, as it makes spotting
real bugs harder to do. this patch correctly addresses both those
points.
~jerry

Reply via email to