Perl/Lint/Policy/ValuesAndExpressions/RequireQuotedHeredocTerminator.pm

filter: Statementstmt 69.5% 16 / 23 Branchbran 0.0% 0 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 83.3% 5 / 6 Podpod 0.0% 0 / 1 totaltotal 61.7% 21 / 34 CC 3 SCAR 16.3
CC
3
Cov
59%
evaluate
12.0
BEGIN
1.0
BEGIN
1.0
CRAP 5.1
« Perl/Lint/Policy/Subroutines/ProhibitSubroutinePrototypes.pm ↑ Summary Perl/Lint/Policy/ValuesAndExpressions/ProhibitNoisyQuotes.pm »
1 package Perl::Lint::Policy::ValuesAndExpressions::RequireQuotedHeredocTerminator;
2 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 2 ▶use Perl::Lint::Constants::Type;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 2 ▶use parent "Perl::Lint::Policy";
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 2 ▶use constant {
Subroutine BEGIN: called CC=1 SCAR=0.0
8 2 DESC => 'Heredoc terminator must be quoted',
9 EXPL => [64],
10 2 };
11  
12 0 ▶sub evaluate {
Subroutine evaluate: not called CC=3 SCAR=24.8
Pod undocumented
13 0 my ($class, $file, $tokens, $src, $args) = @_;
14  
15 0 my @violations;
16 0 ▶ for (my $i = 0, my $token_type; my $token = $tokens->[$i]; $i++) {
Branch: 1 branch
BranchTrueFalseTotal
if (my $token = $tokens->[$i]) 0 0 0
17 0 $token_type = $token->{type};
18  
19 0 ▶ if ($token_type == HERE_DOCUMENT_BARE_TAG) {
Branch: 1 branch
BranchTrueFalseTotal
if ($token_type == 179) 0 0 0
20 push @violations, {
21 filename => $file,
22 line => $token->{line},
23 0 description => DESC,
24 explanation => EXPL,
25 policy => __PACKAGE__,
26 };
27 }
28 }
29  
30 0 return \@violations;
31 }
32  
33 2 1;
34  
« Perl/Lint/Policy/Subroutines/ProhibitSubroutinePrototypes.pm ↑ Summary Perl/Lint/Policy/ValuesAndExpressions/ProhibitNoisyQuotes.pm »