NAME ^

t/codingstd/perlcritic.t - use perlcritic for perl coding stds.

SYNOPSIS ^

 % prove t/codingstd/perlcritic.t

 % perl --policy=TestingAndDebugging::RequireUseWarnings t/codingstd/perlcritic.t

 % perl --group=all t/codingstd/perlcritic.t

 % perl --group=extra t/codingstd/perlcritic.t

DESCRIPTION ^

Tests all perl source files for some very specific perl coding violations.

Optionally specify directories or files on the command line to test only those files, otherwise all files in the MANIFEST will be checked.

By default, this script will validate the specified files against a default set of policies. To run the test for a specific Rule, specify it on the command line before any other files, as:

 perl t/codingstd/perlcritic.t --policy=TestingAndDebugging::RequireUseWarnings

This will, for example, use only that policy (see Perl::Critic for more information on policies) when examining files from the manifest.

Multiple policies can be specified either by separating the individual policies with a comma:

 --policy=foo,bar

and/or by specifying the --policy argument multiple times on the command line.

If you just wish to get a listing of the polices that will be checked without actually running them, use:

 perl t/codingstd/perlcritic.t --list

If you just wish to get a listing of the files that will be checked without actually running the tests, use:

 perl t/codingstd/perlcritic.t --listfiles

Not all policies are analysed by default. To process the extra policies, use the --group=extra argument. To process all policies use:

 perl t/codingstd/perlcritic.t --group=all

BUGS AND LIMITATIONS ^

There's no way to specify options to policies when they are specified on the command line.


parrot