blob: 6c7148436c2dfa5b43bdb1a09d205f2ab3849357 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
#!/usr/bin/env perl
use v5.10;
use strict;
use warnings;
=head1 NAME
20-perl-critic-check.t - use Perl::Critic to check all perl scripts
=head1 DESCRIPTION
This autotest uses Perl::Critic in stern mode to do some static code
checks of all perl scripts and modules within this repo.
=cut
use autodie;
use Cwd qw( abs_path );
use File::Spec::Functions qw( catfile );
use FindBin qw();
use Test::Perl::Critic qw( -severity stern );
use Test::More;
use lib $FindBin::Bin;
use QtQA::PerlChecks;
sub main
{
my $base = abs_path( catfile( $FindBin::Bin, '..' ) );
chdir( $base );
foreach my $file (QtQA::PerlChecks::all_perl_files_in_git( )) {
critic_ok( $file );
}
done_testing( );
return;
}
main if (!caller);
1;
|