line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Perl::Lint::Policy::ValuesAndExpressions::RequireQuotedHeredocTerminator; |
2
|
133
|
|
|
133
|
|
67848
|
use strict; |
|
133
|
|
|
|
|
175
|
|
|
133
|
|
|
|
|
3171
|
|
3
|
133
|
|
|
133
|
|
419
|
use warnings; |
|
133
|
|
|
|
|
157
|
|
|
133
|
|
|
|
|
2451
|
|
4
|
133
|
|
|
133
|
|
737
|
use Perl::Lint::Constants::Type; |
|
133
|
|
|
|
|
144
|
|
|
133
|
|
|
|
|
60772
|
|
5
|
133
|
|
|
133
|
|
545
|
use parent "Perl::Lint::Policy"; |
|
133
|
|
|
|
|
148
|
|
|
133
|
|
|
|
|
571
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
use constant { |
8
|
133
|
|
|
|
|
18602
|
DESC => 'Heredoc terminator must be quoted', |
9
|
|
|
|
|
|
|
EXPL => [64], |
10
|
133
|
|
|
133
|
|
6718
|
}; |
|
133
|
|
|
|
|
170
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub evaluate { |
13
|
6
|
|
|
6
|
0
|
9
|
my ($class, $file, $tokens, $src, $args) = @_; |
14
|
|
|
|
|
|
|
|
15
|
6
|
|
|
|
|
5
|
my @violations; |
16
|
6
|
|
|
|
|
20
|
for (my $i = 0, my $token_type; my $token = $tokens->[$i]; $i++) { |
17
|
43
|
|
|
|
|
29
|
$token_type = $token->{type}; |
18
|
|
|
|
|
|
|
|
19
|
43
|
100
|
|
|
|
75
|
if ($token_type == HERE_DOCUMENT_BARE_TAG) { |
20
|
|
|
|
|
|
|
push @violations, { |
21
|
|
|
|
|
|
|
filename => $file, |
22
|
|
|
|
|
|
|
line => $token->{line}, |
23
|
2
|
|
|
|
|
12
|
description => DESC, |
24
|
|
|
|
|
|
|
explanation => EXPL, |
25
|
|
|
|
|
|
|
policy => __PACKAGE__, |
26
|
|
|
|
|
|
|
}; |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
6
|
|
|
|
|
17
|
return \@violations; |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
1; |
34
|
|
|
|
|
|
|
|