Closed petdance closed 2 years ago
The policies use different themes. This would only happen if you've enabled both themes in your config or the command line.
I don't have any themes enabled.
I suppose if you don't configure any themes then it will run every policy found, which is a highly unfortunate mode of operation. Regardless, the policies are working as designed.
I don't see why that would be unfortunate. I have the policies installed that matter, and I run my code against them.
There are several duplicates with core policies as well. The intended method of operation is listed in the synopsis; if you wish to do something more complex, it's up to you to configure what you want to run. https://metacpan.org/pod/Perl::Critic::Community
(there isn't really anything I could do about this even if I wanted to; any automatic method of removing the functionality of the previous policies would break currently-working workflows using them)
Consider this program foo.pl:
If I run perlcritic on it, I get two errors:
If I then create a
Dev/perlcriticrc
file like so:and rerun I get only one error:
If I add
to my perlcriticrc, then it runs clean.
It looks like the Freenode::DollarAB aliasing to Community::DollarAB means I now have two policies checking on my code, and that I need to silence both of them. :-(