File: 04_critic.t

package info (click to toggle)
libverilog-perl 3.482-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 8,728 kB
  • sloc: perl: 8,685; yacc: 3,387; cpp: 2,266; lex: 1,502; makefile: 8; fortran: 3
file content (29 lines) | stat: -rwxr-xr-x 876 bytes parent folder | download
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
#!/usr/bin/perl -w
# DESCRIPTION: Perl ExtUtils: Type 'make test' to test this package
#
# Copyright 2000-2024 by Wilson Snyder.  This program is free software;
# you can redistribute it and/or modify it under the terms of either the GNU
# Lesser General Public License Version 3 or the Perl Artistic License Version 2.0.

use strict;
use Test;
use warnings;

if (!$ENV{VERILATOR_AUTHOR_SITE} || $ENV{HARNESS_NO_CRITIC}) {
    plan tests => 1;
    skip("author only test (harmless)",1);
} else {
    eval "use Test::Perl::Critic;";
    if ($@) {
	plan tests => 1;
	skip("Test::Perl::Critic not installed so ignoring check (harmless)",1);
    } else {
	#-profile => "t/04_critic.rc"
	Test::Perl::Critic->import( -verbose=>9,
				    -exclude=>['ProhibitExplicitReturnUndef',
					       'ProhibitNoStrict',
					       'ProhibitStringyEval'],
	    );
	all_critic_ok();
    }
}