Bugzilla – Attachment 64090 Details for
Bug 18753
t/00-testcritic.t fails Perl::Critic on test 221
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18753 - t/00-testcritic fails Perl::Critic
Bug-18753---t00-testcritic-fails-PerlCritic.patch (text/plain), 2.02 KB, created by
Lee Jamison
on 2017-06-07 20:32:00 UTC
(
hide
)
Description:
Bug 18753 - t/00-testcritic fails Perl::Critic
Filename:
MIME Type:
Creator:
Lee Jamison
Created:
2017-06-07 20:32:00 UTC
Size:
2.02 KB
patch
obsolete
>From 184fba1858aa01c71d0bd7aa59d249537a6fe30e Mon Sep 17 00:00:00 2001 >From: Lee Jamison <ldjamison@marywood.edu> >Date: Wed, 7 Jun 2017 13:25:41 +0000 >Subject: [PATCH] Bug 18753 - t/00-testcritic fails Perl::Critic > >Bug Description: >When performing a unit test on t/00-testcritic.t with the command >'prove t/00-testcritic.t' test 221 fails Perl::Critic with > >not ok 221 - Test::Perl::Critic for "reserve/request.pl" > Failed test 'Test::Perl::Critic for "reserve/request.pl"' > at /usr/share/perl5/Test/Perl/Critic.pm line 110. > >Perl::Critic found these violations in "reserve/request.pl": >"$itemnumbers_of_biblioitem" is declared but not used at >line 314, column 5. Unused variables clutter code and make it >harder to read (Severity: 3) > >Cause of bug: >The variable $itemnumbers_of_biblioitem is declared but never used >in reserve/request.pl which causes the Perl::Critic violation. > >Patch Description: >This patch removes the variable $itemnumbers_of_biblioitem from >reserve/request.pl in order to satisfy Perl::Critic. The variable >$itemnumbers_of_biblioitem is never used anywhere in >reserve/request.pl other than its declaration so it should not >cause any undesired effects. > >Test Plan: >1) Drop into koha-shell and run the command 'prove t/00-testcritic.t'. >2) Test 221 fails. >3) Apply the patch. >4) Re-run 'prove t/00-testcritic.t'. >5) All of the tests pass now. >6) Quit out of koha-shell. >--- > reserve/request.pl | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/reserve/request.pl b/reserve/request.pl >index 9ec204c..db35e16 100755 >--- a/reserve/request.pl >+++ b/reserve/request.pl >@@ -311,7 +311,7 @@ foreach my $biblionumber (@biblionumbers) { > > ## Here we go backwards again to create hash of biblioitemnumber to itemnumbers, > ## when by definition all of the itemnumber have the same biblioitemnumber >- my ( $itemnumbers_of_biblioitem, $iteminfos_of); >+ my ( $iteminfos_of ); > while ( my $item = $items->next ) { > $item = $item->unblessed; > my $biblioitemnumber = $item->{biblioitemnumber}; >-- >2.1.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 18753
:
64090
|
64092
|
64093