line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Perl::Lint::Policy::Miscellanea::ProhibitUnrestrictedNoLint; |
2
|
134
|
|
|
134
|
|
68302
|
use strict; |
|
134
|
|
|
|
|
184
|
|
|
134
|
|
|
|
|
3253
|
|
3
|
134
|
|
|
134
|
|
475
|
use warnings; |
|
134
|
|
|
|
|
181
|
|
|
134
|
|
|
|
|
2488
|
|
4
|
134
|
|
|
134
|
|
771
|
use Perl::Lint::Constants::Type; |
|
134
|
|
|
|
|
161
|
|
|
134
|
|
|
|
|
61333
|
|
5
|
134
|
|
|
134
|
|
589
|
use parent "Perl::Lint::Policy"; |
|
134
|
|
|
|
|
188
|
|
|
134
|
|
|
|
|
609
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
use constant { |
8
|
134
|
|
|
|
|
18340
|
DESC => q{Unrestricted '## no critic' annotation}, |
9
|
|
|
|
|
|
|
EXPL => 'Only disable the Policies you really need to disable', |
10
|
134
|
|
|
134
|
|
6813
|
}; |
|
134
|
|
|
|
|
184
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub evaluate { |
13
|
6
|
|
|
6
|
0
|
13
|
my ($class, $file, $tokens, $src, $args, $no_lint_lines) = @_; |
14
|
|
|
|
|
|
|
|
15
|
6
|
|
|
|
|
8
|
my @violations; |
16
|
|
|
|
|
|
|
my $no_lint; |
17
|
6
|
|
|
|
|
16
|
for my $line (keys %$no_lint_lines) { |
18
|
25
|
|
|
|
|
17
|
$no_lint = $no_lint_lines->{$line}; |
19
|
|
|
|
|
|
|
|
20
|
25
|
100
|
|
|
|
43
|
if (keys %$no_lint == 0) { |
21
|
13
|
|
|
|
|
42
|
push @violations, { |
22
|
|
|
|
|
|
|
filename => $file, |
23
|
|
|
|
|
|
|
line => $line, |
24
|
|
|
|
|
|
|
description => DESC, |
25
|
|
|
|
|
|
|
explanation => EXPL, |
26
|
|
|
|
|
|
|
policy => __PACKAGE__, |
27
|
|
|
|
|
|
|
}; |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
6
|
|
|
|
|
20
|
return \@violations; |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
1; |
35
|
|
|
|
|
|
|
|