Re: Cleaning up perl code

2024-07-03 Thread Dagfinn Ilmari Mannsåker
Michael Paquier writes: > On Tue, Jul 02, 2024 at 01:55:25PM +0100, Dagfinn Ilmari Mannsåker wrote: >> For clarity, I've rebased my addional unused-variable changes (except >> the errcodes-related ones, see below) onto current master, and split it >> into separate commits with detailed explaiatio

Re: Cleaning up perl code

2024-07-02 Thread Michael Paquier
On Tue, Jul 02, 2024 at 01:55:25PM +0100, Dagfinn Ilmari Mannsåker wrote: > For clarity, I've rebased my addional unused-variable changes (except > the errcodes-related ones, see below) onto current master, and split it > into separate commits with detailed explaiations for each file file, see > at

Re: Cleaning up perl code

2024-07-02 Thread Dagfinn Ilmari Mannsåker
Andrew Dunstan writes: > On 2024-07-02 Tu 8:55 AM, Dagfinn Ilmari Mannsåker wrote: >> Relatedly, I also had a look at prohibiting unused regex captures >> (RegularExpressions::ProhibitUnusedCapture), which found a few real >> cases, but also lots of false positives in Catalog.pm, because it >> do

Re: Cleaning up perl code

2024-07-02 Thread Andrew Dunstan
On 2024-07-02 Tu 8:55 AM, Dagfinn Ilmari Mannsåker wrote: Relatedly, I also had a look at prohibiting unused regex captures (RegularExpressions::ProhibitUnusedCapture), which found a few real cases, but also lots of false positives in Catalog.pm, because it doesn't understand that %+ uses all na

Re: Cleaning up perl code

2024-07-02 Thread Dagfinn Ilmari Mannsåker
Michael Paquier writes: > On Fri, May 24, 2024 at 02:09:49PM +0900, Michael Paquier wrote: >> For now, I have staged for commit the attached, that handles most of >> the changes from Alexander (msvc could go for more cleanup?). > > This one has been applied as of 0c1aca461481 now that v18 is > op

Re: Cleaning up perl code

2024-07-01 Thread Michael Paquier
On Fri, May 24, 2024 at 02:09:49PM +0900, Michael Paquier wrote: > For now, I have staged for commit the attached, that handles most of > the changes from Alexander (msvc could go for more cleanup?). This one has been applied as of 0c1aca461481 now that v18 is open. > I'll look at the changes fro

Re: Cleaning up perl code

2024-05-23 Thread Michael Paquier
On Tue, May 21, 2024 at 02:33:16PM +0900, Michael Paquier wrote: > Nice catches from both of you. The two ones in > generate-wait_event_types.pl are caused by me, actually. > > Not sure about the changes in the errcodes scripts, though. The > current state of thing can be also useful when it com

Re: Cleaning up perl code

2024-05-20 Thread Michael Paquier
On Tue, May 21, 2024 at 06:00:00AM +0300, Alexander Lakhin wrote: > I reviewed my collection of unica I gathered for several months, but had > found some of them too minor/requiring more analysis. > Then I added more with perlcritic's policy UnusedVariables, and also > checked for unused subs with

Re: Cleaning up perl code

2024-05-20 Thread Alexander Lakhin
Hello Dagfinn, Thank you for paying attention to it and improving the possible fix! 20.05.2024 23:39, Dagfinn Ilmari Mannsåker wrote: Nice cleanup! Did you use some static analysis tool, or did look for them manually? I reviewed my collection of unica I gathered for several months, but had f

Re: Cleaning up perl code

2024-05-20 Thread Dagfinn Ilmari Mannsåker
Alexander Lakhin writes: > Hello hackers, > > Please look at a bunch of unused variables and a couple of other defects > I found in the perl code, maybe you'll find them worth fixing: Nice cleanup! Did you use some static analysis tool, or did look for them manually? If I add [Variables::Prohi