Bug 5596 [REVISED 2] add author to holds to pull report
[koha.git] / t / 00-testcritic.t
blob6018502a40dce9fd1a0270c75a97f01df62d8f18
1 #!/usr/bin/env perl
2 use strict;
3 use warnings;
5 # This script can be used to run perlcritic on perl files in koha
6 # It calls its own custom perlcriticrc
7 # The script is purely optional requiring Test::Perl::Critic to be installed
8 # and the environment variable TEST_QA to be set
9 # At present only the directories in @dirs will pass the tests in 'Gentle' mode
11 use File::Spec;
12 use Test::More;
13 use English qw(-no_match_vars);
15 my @all_koha_dirs = qw( acqui admin authorities basket C4 catalogue cataloguing circ debian errors
16 labels members misc offline_circ opac patroncards reports reserve reviews rotating_collections
17 serials sms suggestion t tags test tools virtualshelves);
19 my @dirs = qw( acqui admin authorities basket catalogue cataloguing circ debian errors labels
20 offline_circ reserve reviews rotating_collections serials sms virtualshelves );
22 if ( not $ENV{TEST_QA} ) {
23 my $msg = 'Author test. Set $ENV{TEST_QA} to a true value to run';
24 plan( skip_all => $msg );
27 eval { require Test::Perl::Critic; };
29 if ( $EVAL_ERROR ) {
30 my $msg = 'Test::Perl::Critic required to criticise code,';
31 plan( skip_all => $msg );
34 my $rcfile = File::Spec->catfile( 't', 'perlcriticrc' );
35 Test::Perl::Critic->import( -profile => $rcfile);
36 all_critic_ok(@dirs);