Add a perlcritic rule to 00-perlcritic.t to prevent unused declared variable.
Created attachment 45177 [details] [review] Bug 15258 Fix Perl scripts declaring unused variables
Created attachment 45178 [details] [review] Bug 15258 Fix Perl scripts declaring unused variables
Created attachment 45179 [details] [review] Bug 15258 Prevent unused declared variables Add a perlcritic rule to 00-perlcritic.t to prevent unused declared variable. TO TEST: - Apply the 1st patch (unit test) - Run the UT: prove -v t/00-testcritic.t - Note that several Perl script fail - Apply the 2nd patch - Run the UT, and confirm it passes.
Created attachment 45232 [details] [review] [SIGNED-OFF]Bug 15258: Prevent unused declared variables Add a perlcritic rule to 00-perlcritic.t to prevent unused declared variable. TO TEST: - Apply the 1st patch (unit test) - Run the UT: prove -v t/00-testcritic.t - Note that several Perl script fail - Apply the 2nd patch - Run the UT, and confirm it passes. Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com> All tests pass successful.
Created attachment 45233 [details] [review] Bug 15258 Fix Perl scripts declaring unused variables
Created attachment 45234 [details] [review] [SIGNED-OFF]Bug 15258: Fix Perl scripts declaring unused variables Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Created attachment 45235 [details] [review] [SIGNED-OFF]Bug 15258: Fix Perl scripts declaring unused variables Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Created attachment 45236 [details] [review] [SIGNED-OFF]Bug 15258: Prevent unused declared variables Add a perlcritic rule to 00-perlcritic.t to prevent unused declared variable. TO TEST: - Apply the 1st patch (unit test) - Run the UT: prove -v t/00-testcritic.t - Note that several Perl script fail - Apply the 2nd patch - Run the UT, and confirm it passes. Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com> All tests pass successful.
Created attachment 45270 [details] [review] Bug 15258: Fix Perl scripts declaring unused variables Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Created attachment 45271 [details] [review] Bug 15258: Prevent unused declared variables Add a perlcritic rule to 00-perlcritic.t to prevent unused declared variable. TO TEST: - Apply the 1st patch (unit test) - Run the UT: prove -v t/00-testcritic.t - Note that several Perl script fail - Apply the 2nd patch - Run the UT, and confirm it passes. Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com> All tests pass successful. Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Well done Frédéric :) I have added a new rule to the qa script: commit e50dc8eae505819ff3c9a7af67de7e2498c66902 CommitDate: Tue Dec 1 14:45:37 2015 +0000 Add ProhibitUnusedVariables to perlcritic rules
Pushed to master. Thanks for your contribution!
Patch pushed to 3.22.x, will be in 3.22.2