line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Perl::Lint::Policy::Miscellanea::ProhibitUselessNoLint; |
2
|
134
|
|
|
134
|
|
73929
|
use strict; |
|
134
|
|
|
|
|
201
|
|
|
134
|
|
|
|
|
3229
|
|
3
|
134
|
|
|
134
|
|
427
|
use warnings; |
|
134
|
|
|
|
|
171
|
|
|
134
|
|
|
|
|
2493
|
|
4
|
134
|
|
|
134
|
|
911
|
use Perl::Lint::Constants::Type; |
|
134
|
|
|
|
|
157
|
|
|
134
|
|
|
|
|
59192
|
|
5
|
134
|
|
|
134
|
|
573
|
use parent "Perl::Lint::Policy"; |
|
134
|
|
|
|
|
185
|
|
|
134
|
|
|
|
|
592
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
use constant { |
8
|
134
|
|
|
|
|
16895
|
DESC => q{Useless '## no critic' annotation}, |
9
|
|
|
|
|
|
|
EXPL => 'This annotation can be removed', |
10
|
134
|
|
|
134
|
|
6631
|
}; |
|
134
|
|
|
|
|
199
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub evaluate { |
13
|
4
|
|
|
4
|
0
|
7
|
my ($class, $file, $no_lint_lines, $used_no_lint_lines) = @_; |
14
|
|
|
|
|
|
|
|
15
|
4
|
|
|
|
|
3
|
my @violations; |
16
|
4
|
|
|
|
|
8
|
for my $line (keys %$no_lint_lines) { |
17
|
7
|
100
|
|
|
|
12
|
unless ($used_no_lint_lines->{$line}) { |
18
|
2
|
|
|
|
|
9
|
push @violations, { |
19
|
|
|
|
|
|
|
filename => $file, |
20
|
|
|
|
|
|
|
line => $line, |
21
|
|
|
|
|
|
|
description => DESC, |
22
|
|
|
|
|
|
|
explanation => EXPL, |
23
|
|
|
|
|
|
|
policy => __PACKAGE__, |
24
|
|
|
|
|
|
|
}; |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
4
|
|
|
|
|
10
|
return \@violations; |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
1; |
32
|
|
|
|
|
|
|
|