diff --git a/Koha/Devel/Files.pm b/Koha/Devel/Files.pm index 3d6911d906..51e81e1cbc 100644 --- a/Koha/Devel/Files.pm +++ b/Koha/Devel/Files.pm @@ -46,6 +46,15 @@ my $exceptions = { misc/translator/TmplTokenizer.pm ) ], + strict => [ + qw( + Koha/Account/Credit.pm + Koha/Account/Debit.pm + Koha/Old/Hold.pm + t + xt + ) + ], codespell => [ qw( installer/data/mysql/updatedatabase.pl diff --git a/t/db_dependent/00-strict.t b/t/db_dependent/00-strict.t index 5a1e47100f..a9127b414b 100755 --- a/t/db_dependent/00-strict.t +++ b/t/db_dependent/00-strict.t @@ -4,34 +4,20 @@ use Modern::Perl; use threads; # used for parallel -use Test::NoWarnings qw( had_no_warnings ); +use Test::NoWarnings; use Test::More; use Test::Strict; use Parallel::ForkManager; use Sys::CPU; +use Koha::Devel::Files; + use lib("misc/translator"); use lib("installer"); -my @dirs = ( - 'acqui', 'admin', - 'authorities', 'basket', - 'catalogue', 'cataloguing', - 'changelanguage.pl', 'circ', - 'debian', 'docs', - 'errors', 'fix-perl-path.PL', 'help.pl', - 'installer', 'kohaversion.pl', 'labels', - 'mainpage.pl', 'Makefile.PL', - 'members', 'misc', - 'offline_circ', 'opac', - 'patroncards', 'reports', - 'reserve', 'reviews', - 'rewrite-config.PL', 'rotating_collections', - 'serials', 'services', - 'skel', 'suggestion', - 'svc', 'tags', - 'tools', 'virtualshelves' -); +my $dev_files = Koha::Devel::Files->new( { context => 'strict' } ); +my @files = $dev_files->ls_perl_files; +plan tests => scalar @files + 1; $Test::Strict::TEST_STRICT = 0; @@ -44,15 +30,12 @@ if ( $ENV{KOHA_PROVE_CPUS} ) { my $pm = Parallel::ForkManager->new($ncpu); -foreach my $d (@dirs) { +foreach my $f (@files) { $pm->start and next; # do the fork - all_perl_files_ok($d); + strict_ok($f); $pm->finish; # do the exit in the child process } $pm->wait_all_children; - -had_no_warnings; -done_testing();