in reply to SOLVED: Can't figure out how to quiet perlcritic and ignore RequireUseStrict perlcritic rule

perlcritic --exclude RequireUseStrict foo.pm works for me. Are you sure that your local rc file is actually being read and acted upon?


🦛

  • Comment on Re: Can't figure out how to quiet perlcritic and ignore RequireUseStrict perlcritic rule
  • Download Code

Replies are listed 'Best First'.
Re^2: Can't figure out how to quiet perlcritic and ignore RequireUseStrict perlcritic rule
by nysus (Parson) on Jan 15, 2024 at 17:07 UTC

    Thanks for getting back. Yeah, I just discovered the .perlcriticrc file is not working as I assumed it was. I'm about to go back to the documentation and fill my gap in knowledge of how .perlcriticrc files work. my .perlcriticrc file is in the directory above my test. I thought perlcritic searched up the directory tree for .perlcriticrc files. And it seemed to work. When I increased the severity setting in the rc file, I saw more warnings. So I figured it worked as I thought.

    But then I copied the .perlcriticrc file directly into my test directory and now the pesky warning is gone.

    So clearly I don't know how the perlcritic config files are found/used.

    $PM = "Perl Monk's";
    $MC = "Most Clueless Friar Abbot Bishop Pontiff Deacon Curate Priest Vicar Parson";
    $nysus = $PM . ' ' . $MC;
    Click here if you love Perl Monks

Re^2: Can't figure out how to quiet perlcritic and ignore RequireUseStrict perlcritic rule
by nysus (Parson) on Jan 15, 2024 at 17:59 UTC

    OK, so the ALE vim plugin I was using searches up the directory tree for the nearest perlcritic file. I have no idea why ALE was ignoring directives in the config but at any rate, that's not a perl problem.

    $PM = "Perl Monk's";
    $MC = "Most Clueless Friar Abbot Bishop Pontiff Deacon Curate Priest Vicar Parson";
    $nysus = $PM . ' ' . $MC;
    Click here if you love Perl Monks