[Koha-bugs] [Bug 18753] t/00-testcritic.t fails Perl::Critic on test 221

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Jun 7 22:32:00 CEST 2017


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18753

--- Comment #1 from Lee Jamison <ldjamison at marywood.edu> ---
Created attachment 64090
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=64090&action=edit
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.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list