os-autoinst / os-autoinst-common

Common helpers for os-autoinst and openQA development
MIT License
0 stars 9 forks source link

tools/perlcriric fails in Leap 15.5 #48

Open perlpunk opened 8 months ago

perlpunk commented 8 months ago
% tools/perlcritic .
lib/OpenQA/Test/PatchDeparse.pm source OK
lib/OpenQA/Test/TimeLimit.pm source OK
lib/perlcritic/Perl/Critic/Policy/ArgumentInUseStrictWarnings.pm source OK
lib/perlcritic/Perl/Critic/Policy/RedundantStrictWarning.pm source OK
lib/perlcritic/Perl/Critic/Policy/SpaceAfterSubroutineName.pm source OK
lib/perlcritic/Perl/Critic/Policy/HashKeyQuotes.pm source OK
tools/perlcritic source OK
tools/tidyall source OK
tools/update-deps source OK
xt/01-make-update-deps.t source OK
::warning file=local/bin/perltidy,line=1,col=1,title=Missing strict or warnings - severity 4::[Community::StrictWarnings] The strict and warnings pragmas are important to avoid common pitfalls and deprecated/experimental functionality. Make sure each script or module contains "use strict; use warnings;" or a module that does this for you
::warning file=local/bin/perltidy,line=1,col=1,title=Missing strict or warnings - severity 4::[Community::StrictWarnings] The strict and warnings pragmas are important to avoid common pitfalls and deprecated/experimental functionality. Make sure each script or module contains "use strict; use warnings;" or a module that does this for you
::warning file=local/bin/perltidy,line=6,col=1,title=Code before strictures are enabled - severity 5::[TestingAndDebugging::RequireUseStrict] See page 429 of PBP
::warning file=local/bin/perltidy,line=12,col=45,title=Useless interpolation of literal string - severity 3::[ValuesAndExpressions::ProhibitInterpolationOfLiterals] See page 51 of PBP
Fatal error while critiquing "local/lib/perl5/Perl/Tidy.pm": Can't call method "isa" without a package or object reference at /home/tina/develop/github/os-autoinst-common/tools/../lib/perlcritic/Perl/Critic/Policy/SpaceAfterSubroutineName.pm line 54.

Why is the workflow https://github.com/os-autoinst/os-autoinst-common/actions/runs/7814037291/job/21314430765#step:4:2 passing?

perlpunk commented 8 months ago

I think because I had a newer perlcritic version installed in local/. However, if this new perlcritic version breaks lib/perlcritic/Perl/Critic/Policy/SpaceAfterSubroutineName.pm then this should be fixed.

okurz commented 8 months ago

Could be. I could not reproduce the problem

perlpunk commented 8 months ago

Ah no, I had Perl::Tidy installed in local, and perlcritic running on local/lib/perl5/Perl/Tidy.pm produced this problem. This should not happen. SpaceAfterSubroutineName.pm needs to be fixed.

josegomezr commented 8 months ago

36 solves this issue and can critique Perl/Tidy.pm without issues :P