Bug 15258

Summary: Prevent unused declared variables
Product: Koha Reporter: Frédéric Demians <f.demians>
Component: Test SuiteAssignee: Frédéric Demians <f.demians>
Status: CLOSED FIXED QA Contact: Galen Charlton <gmcharlt>
Severity: enhancement    
Priority: P5 - low CC: hector.hecaxmmx, jonathan.druart, julian.maurice, jweaver
Version: Main   
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: --- Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
Circulation function:
Attachments: Bug 15258 Fix Perl scripts declaring unused variables
Bug 15258 Fix Perl scripts declaring unused variables
Bug 15258 Prevent unused declared variables
[SIGNED-OFF]Bug 15258: Prevent unused declared variables
Bug 15258 Fix Perl scripts declaring unused variables
[SIGNED-OFF]Bug 15258: Fix Perl scripts declaring unused variables
[SIGNED-OFF]Bug 15258: Fix Perl scripts declaring unused variables
[SIGNED-OFF]Bug 15258: Prevent unused declared variables
Bug 15258: Fix Perl scripts declaring unused variables
Bug 15258: Prevent unused declared variables

Description Frédéric Demians 2015-11-26 07:25:04 UTC
Add a perlcritic rule to 00-perlcritic.t to prevent unused declared variable.
Comment 1 Frédéric Demians 2015-11-26 07:29:40 UTC Comment hidden (obsolete)
Comment 2 Frédéric Demians 2015-11-26 07:30:04 UTC Comment hidden (obsolete)
Comment 3 Frédéric Demians 2015-11-26 07:31:03 UTC Comment hidden (obsolete)
Comment 4 Héctor Eduardo Castro Avalos 2015-11-30 16:57:21 UTC Comment hidden (obsolete)
Comment 5 Héctor Eduardo Castro Avalos 2015-11-30 17:00:41 UTC Comment hidden (obsolete)
Comment 6 Héctor Eduardo Castro Avalos 2015-11-30 17:06:02 UTC Comment hidden (obsolete)
Comment 7 Héctor Eduardo Castro Avalos 2015-11-30 17:08:55 UTC Comment hidden (obsolete)
Comment 8 Héctor Eduardo Castro Avalos 2015-11-30 17:09:31 UTC Comment hidden (obsolete)
Comment 9 Jonathan Druart 2015-12-01 14:47:25 UTC
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>
Comment 10 Jonathan Druart 2015-12-01 14:47:32 UTC
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>
Comment 11 Jonathan Druart 2015-12-01 14:48:27 UTC
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
Comment 12 Jesse Weaver 2015-12-31 00:25:37 UTC
Pushed to master. Thanks for your contribution!
Comment 13 Julian Maurice 2015-12-31 13:36:43 UTC
Patch pushed to 3.22.x, will be in 3.22.2