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>
Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
This corrects a failing test and follows a recommendation
by the maintainer of DBIx::Class. This patch also
adds a couple new directories for t/00-testcritic.t to
check.
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Add C4/SIP to perlcritic tests. Fix those issues that were
generating perlcritic errors
Signed-off-by: Stacey Walker <stacey@catalyst-eu.net>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Scripts in admin & acqui subdirectores weren't passing t/00-testcritic.t. This
patch add admin & acqui scripts to test case and fix various errors related to
Perl::Critic compliancy.
- Fixing a style error to pass Perl::Critic, plus silencing a warn
- More style errors, plus fixing a security issue
- Explicitly using Carp
Contrary to common belief, subroutine prototypes do not enable
compile-time checks for proper arguments. Don't use them.
Defining a named sub within another sub, does not prevent that
subroutine being global
Signed-off-by: Frédéric Demians <frederic@tamil.fr>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Tests are run if TEST_QA environment variable is set
and Test::Perl::Critic is installed
e.g.
TEST_QA=1 prove =l t/00-testcritic.t
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>