View | Details | Raw Unified | Return to bug 39877
Collapse All | Expand All

(-)a/Koha/Devel/Files.pm (-5 / +5 lines)
Lines 11-17 Koha::Devel::Files - A utility module for managing and filtering file lists in t Link Here
11
11
12
    use Koha::Devel::Files;
12
    use Koha::Devel::Files;
13
13
14
    my $file_manager = Koha::Devel::Files->new({ context => 'tidy' });
14
    my $file_manager = Koha::Devel::Files->new( { context => 'tidy' } );
15
15
16
    my @perl_files = $file_manager->ls_perl_files($git_range);
16
    my @perl_files = $file_manager->ls_perl_files($git_range);
17
    my @js_files   = $file_manager->ls_js_files();
17
    my @js_files   = $file_manager->ls_js_files();
Lines 110-116 my $exceptions = { Link Here
110
110
111
=head2 new
111
=head2 new
112
112
113
    my $file_manager = Koha::Devel::Files->new({ context => 'tidy' });
113
    my $file_manager = Koha::Devel::Files->new( { context => 'tidy' } );
114
114
115
Creates a new instance of Koha::Devel::Files. The constructor accepts a hash reference with a 'context' key, which specifies the context for file exclusions.
115
Creates a new instance of Koha::Devel::Files. The constructor accepts a hash reference with a 'context' key, which specifies the context for file exclusions.
116
116
Lines 148-154 sub build_git_exclude { Link Here
148
148
149
=head2 ls_files
149
=head2 ls_files
150
150
151
    my @files = $file_manager->ls_files($filetype, $git_range);
151
    my @files = $file_manager->ls_files( $filetype, $git_range );
152
152
153
Lists files that have been modified within a specified Git range. If no range is provided, it lists all Perl files, excluding those specified in the exceptions.
153
Lists files that have been modified within a specified Git range. If no range is provided, it lists all Perl files, excluding those specified in the exceptions.
154
154
Lines 204-210 sub ls_perl_files { Link Here
204
        my @exception_files = $exceptions->{pl}->{ $self->{context} };
204
        my @exception_files = $exceptions->{pl}->{ $self->{context} };
205
        @files = array_minus( @files, @exception_files );
205
        @files = array_minus( @files, @exception_files );
206
    } else {
206
    } else {
207
        my $cmd = sprintf q{git ls-files '*.pl' '*.PL' '*.pm' '*.t' svc opac/svc opac/unapi debian/build-git-snapshot %s},
207
        my $cmd =
208
            sprintf q{git ls-files '*.pl' '*.PL' '*.pm' '*.t' svc opac/svc opac/unapi debian/build-git-snapshot %s},
208
            $self->build_git_exclude('pl');
209
            $self->build_git_exclude('pl');
209
        @files = qx{$cmd};
210
        @files = qx{$cmd};
210
        chomp for @files;
211
        chomp for @files;
211
- 

Return to bug 39877