Next: , Previous: perltidy, Up: Top


22 Calling perlcritic

“perlcritic” is a Perl source code analyzer. See perldoc perlcritic for detail document of the program. perlcritic.el provide an interface to use “perlcritic” in Emacs. It invoke the program using compile, highlight severity and add hyperlink to the error.

— Command: perlcritic

Call perlcritic interactive. You can give your argments in the minibuffer. Default perform analyzing current visited file.

— Command: perlcritic-region

perlcritic is known run a little slow. You can use this command to analyze only a part of file.

perlcritic provide a lot of options in command line. perlcritic.el only support a few of options. Additional options can be input in the minibuffer or write your profile, default is .perlcriticrc.

— User Option: perlcritic-profile

Specify an alternate .perlcriticrc file. If value is nil, use -noprofile, If value is t, use the default profile .perlcriticrc, If non-nil, and the profile exists, use the profile.

— User Option: perlcritic-severity

Default severity level is 5 and perlcritic-severity value is nil.

— User Option: perlcritic-top

Report only the top N Policy violations in each file. If the -severity option is not explicitly given, the -top option implies that the minimum severity level is 1. Users can redefine the severity for any Policy in their .perlcriticrc file.

— User Option: perlcritic-include

Directs “perlcritic” to apply additional Policies that match the regex “/PATTERN/imx”.

— User Option: perlcritic-exclude

Directs “perlcritic” to not apply any Policy that matches the regex “/PATTERN/imx”.