File: 02-integrity.t

package info (click to toggle)
libvalidation-class-perl 7.900057-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster
  • size: 1,616 kB
  • sloc: perl: 21,493; makefile: 2
file content (39 lines) | stat: -rw-r--r-- 1,060 bytes parent folder | download | duplicates (5)
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
use FindBin;
use Test::More;

use utf8;
use strict;
use warnings;

SKIP: {

    eval {
        require 'Perl/Critic.pm';
    };

    plan skip_all =>
        'Perl::Critic is not installed and/or DEVELOPMENT_TESTS is not set.'
        if $@ || ! $ENV{'DEVELOPMENT_TESTS'}
    ;

    my $lib     = $FindBin::RealBin . "/../lib/";
    my @profile = qw(
        -5
        --severity 4
        --exclude Modules::RequireVersionVar
        --exclude Subroutines::RequireArgUnpacking
        --exclude BuiltinFunctions::RequireBlockGrep
        --exclude Subroutines::ProhibitBuiltinHomonyms
        --exclude Modules::ProhibitAutomaticExportation
        --exclude TestingAndDebugging::ProhibitNoStrict
        --exclude TestingAndDebugging::ProhibitNoWarnings
        --exclude Variables::ProhibitConditionalDeclarations
        --exclude ValuesAndExpressions::ProhibitAccessOfPrivateData
        --exclude TestingAndDebugging::ProhibitProlongedStrictureOverride
    );

    ok ! system("perlcritic", @profile, $lib), "library passes critique";

}

done_testing;