Lines 4-10
use Test::PerlTidy;
Link Here
|
4 |
use Test::More; |
4 |
use Test::More; |
5 |
use Test::NoWarnings; |
5 |
use Test::NoWarnings; |
6 |
|
6 |
|
7 |
use Koha::Devel::Files; |
7 |
use Koha::Devel::CI::IncrementalRuns; |
8 |
|
8 |
|
9 |
my $codespell_version = qx{codespell --version}; |
9 |
my $codespell_version = qx{codespell --version}; |
10 |
chomp $codespell_version; |
10 |
chomp $codespell_version; |
Lines 12-27
$codespell_version =~ s/-.*$//;
Link Here
|
12 |
if ( ( $codespell_version =~ s/\.//gr ) < 220 ) { # if codespell < 2.2.0 |
12 |
if ( ( $codespell_version =~ s/\.//gr ) < 220 ) { # if codespell < 2.2.0 |
13 |
plan skip_all => "codespell version $codespell_version too low, need at least 2.2.0"; |
13 |
plan skip_all => "codespell version $codespell_version too low, need at least 2.2.0"; |
14 |
} |
14 |
} |
15 |
my $dev_files = Koha::Devel::Files->new( { context => 'codespell' } ); |
15 |
|
|
|
16 |
my $ci = Koha::Devel::CI::IncrementalRuns->new( { context => 'codespell' } ); |
16 |
my @files; |
17 |
my @files; |
17 |
push @files, $dev_files->ls_perl_files; |
18 |
push @files, $ci->get_files_to_test('pl'); |
18 |
push @files, $dev_files->ls_tt_files; |
19 |
push @files, $ci->get_files_to_test('tt'); |
19 |
push @files, $dev_files->ls_js_files; |
20 |
push @files, $ci->get_files_to_test('js'); |
20 |
|
21 |
|
21 |
plan tests => scalar(@files) + 1; |
22 |
plan tests => scalar(@files) + 1; |
22 |
|
23 |
|
|
|
24 |
my %results; |
23 |
for my $file (@files) { |
25 |
for my $file (@files) { |
24 |
my $output = qx{codespell -d --ignore-words .codespell-ignore $file}; |
26 |
my $output = qx{codespell -d --ignore-words .codespell-ignore $file}; |
25 |
chomp $output; |
27 |
chomp $output; |
26 |
is( $output, q{} ); |
28 |
is( $output, q{} ) or $results{$file} = 1; |
27 |
} |
29 |
} |
|
|
30 |
|
31 |
$ci->report_results( \%results ); |