Bug 26265: (QA follow-up) Remove g option from regex, add few dirs
[koha.git] / t / 00-testcritic.t
1 #!/usr/bin/env perl
2
3 # This script can be used to run perlcritic on perl files in koha
4 # The script is purely optional requiring Test::Perl::Critic to be installed 
5 # and the environment variable TEST_QA to be set
6
7 use Modern::Perl;
8 use Test::More;
9 use English qw(-no_match_vars);
10
11 if ( not $ENV{TEST_QA} ) {
12     my $msg = 'Author test. Set $ENV{TEST_QA} to a true value to run';
13     plan( skip_all => $msg );
14 }
15
16 eval { require Test::Perl::Critic; };
17
18 if ( $EVAL_ERROR ) {
19     my $msg = 'Test::Perl::Critic required to criticise code,';
20     plan( skip_all => $msg );
21 }
22
23 Test::Perl::Critic->import( -profile => '.perlcriticrc');
24 all_critic_ok('.');