|
Lines 1-6
Link Here
|
| 1 |
#!/usr/bin/env perl |
1 |
#!/usr/bin/env perl |
| 2 |
use strict; |
|
|
| 3 |
use warnings; |
| 4 |
|
2 |
|
| 5 |
# This script can be used to run perlcritic on perl files in koha |
3 |
# This script can be used to run perlcritic on perl files in koha |
| 6 |
# It calls its own custom perlcriticrc |
4 |
# It calls its own custom perlcriticrc |
|
Lines 8-23
use warnings;
Link Here
|
| 8 |
# and the environment variable TEST_QA to be set |
6 |
# and the environment variable TEST_QA to be set |
| 9 |
# At present only the directories in @dirs will pass the tests in 'Gentle' mode |
7 |
# At present only the directories in @dirs will pass the tests in 'Gentle' mode |
| 10 |
|
8 |
|
|
|
9 |
use Modern::Perl; |
| 11 |
use File::Spec; |
10 |
use File::Spec; |
| 12 |
use Test::More; |
11 |
use Test::More; |
| 13 |
use English qw(-no_match_vars); |
12 |
use English qw(-no_match_vars); |
| 14 |
|
13 |
|
| 15 |
my @all_koha_dirs = qw( acqui admin authorities basket C4 catalogue cataloguing circ course_reserves debian errors |
14 |
my @dirs = qw( |
| 16 |
labels members misc offline_circ opac patroncards patron_lists reports reserve reviews rotating_collections |
15 |
acqui |
| 17 |
serials sms suggestion t tags test tools virtualshelves Koha); |
16 |
admin |
| 18 |
|
17 |
authorities |
| 19 |
my @dirs = qw( acqui admin authorities basket catalogue cataloguing circ debian errors labels |
18 |
basket |
| 20 |
members offline_circ reserve reviews rotating_collections serials sms virtualshelves Koha C4/SIP); |
19 |
catalogue |
|
|
20 |
cataloguing |
| 21 |
circ |
| 22 |
debian |
| 23 |
errors |
| 24 |
labels |
| 25 |
members |
| 26 |
offline_circ |
| 27 |
reserve |
| 28 |
reviews |
| 29 |
rotating_collections |
| 30 |
serials |
| 31 |
sms |
| 32 |
virtualshelves |
| 33 |
Koha |
| 34 |
C4/SIP |
| 35 |
); |
| 21 |
|
36 |
|
| 22 |
if ( not $ENV{TEST_QA} ) { |
37 |
if ( not $ENV{TEST_QA} ) { |
| 23 |
my $msg = 'Author test. Set $ENV{TEST_QA} to a true value to run'; |
38 |
my $msg = 'Author test. Set $ENV{TEST_QA} to a true value to run'; |