d9705996 / perl-toolbox

VSCode Extension for perlcritic Linting
https://marketplace.visualstudio.com/items?itemName=d9705996.perl-toolbox
12 stars 11 forks source link

File name doesn't get preserved for Perlcritic #24

Open dseynhae opened 4 years ago

dseynhae commented 4 years ago

Consider the simple file <location>/BaseClass/DerivedClass/MyJob.pm:

package BaseClass::DerivedClass::MyJob 1.0;
use strict;
use warnings;
1;

I have tried the following experiment in VS Code opened on folder <location>, or directly on the file MyJob.pm (both Windows and Linux give the same problem):

  1. In the Bash Terminal, there is no problem; as expected I get: image
  2. However the Perl Toolbox wrapper introduces an error: image

I do have the impression that PerlToolbox changes the path of the file, under the hood??? Not sure why Perlcritic would change its mind about this particular issue.

I do have a ~/.perlcriticrc file (attached), but it is irrelevant to reproduce this problem... perlcriticrc.txt

dseynhae commented 4 years ago

Did some more debugging, to my surprise, it is not related to the hierarchy:

package MyJob 1.0;
use strict;
use warnings;
1;

Will give the same discrepancy (perlcritic says there is no problem, but perlcritic as called by Perl Toolbox has an issue...).

dseynhae commented 4 years ago

It looks like the file is renamed with the suffix .lint: image

That would trigger the file name violation: image

utgwkk commented 3 years ago

Reproduced with no .perlcriticrc file. The file tree under lib directory should be preserved when linting with perlcritic.