Debian Codegraph @

author.t/critic.t

raw
1 #!/usr/bin/perl
2 # Copyright 2022 Jeffrey Kegler
3 # This file is part of Marpa::R2. Marpa::R2 is free software: you can
4 # redistribute it and/or modify it under the terms of the GNU Lesser
5 # General Public License as published by the Free Software Foundation,
6 # either version 3 of the License, or (at your option) any later version.
7 #
8 # Marpa::R2 is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 # Lesser General Public License for more details.
12 #
13 # You should have received a copy of the GNU Lesser
14 # General Public License along with Marpa::R2. If not, see
15 # http://www.gnu.org/licenses/.
16
17 use 5.010001;
18 use strict;
19 use warnings;
20 use English qw( -no_match_vars );
21 use Fatal qw( open close );
22 use Carp;
23 use Perl::Critic;
24 use Test::Perl::Critic;
25 use Test::More;
26
27 # Test that the module passes perlcritic
28 BEGIN {
29 $OUTPUT_AUTOFLUSH = 1;
30 }
31
32 open my $critic_list, '<', 'author.t/critic.list';
33 my @test_files = <$critic_list>;
34 close $critic_list;
35 chomp @test_files;
36
37 my $rcfile = File::Spec->catfile( 'author.t', 'perlcriticrc' );
38 Test::Perl::Critic->import(
39 -verbose => '%l:%c %p %r',
40 -profile => $rcfile,
41 -exclude => [ 'Dynamic::*', 'CodeLayout::RequireTidyCode' ],
42 );
43 Test::Perl::Critic::all_critic_ok(@test_files);
44
45 1;