Perlcritic with additional profiles

Is it possible to "add" another profile to the default perlcritic profile, or run perlcritic with multiple profiles? I don't want to skip / replace the default profile. I need to add an additional profile to it.

I know I could export the current profile and add my additions and then use that as the default profile. But in this case, I have to make sure to do the same after every perlcritic update, as the default profile may have been updated.

+3


source to share


1 answer


Yours .perlcriticrc

modifies the default profile, not replaces it. There's a command line parameter --only

to tell it to only use the policies listed in yours .perlcriticrc

and skip the default profile. You can also specify this in yours .perlcriticrc

by placing only = 1

above the first named section of the file. If you don't specify --only

on the command line or only = 1

in .perltidyrc

, yours .perltidyrc

will change the default profile rather than throw it away and replace it.



See perlcritic POD for details .

0


source







All Articles