line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Perl::Lint::Policy::Miscellanea::ProhibitUselessNoLint; |
2
|
134
|
|
|
134
|
|
75112
|
use strict; |
|
134
|
|
|
|
|
199
|
|
|
134
|
|
|
|
|
3322
|
|
3
|
134
|
|
|
134
|
|
477
|
use warnings; |
|
134
|
|
|
|
|
192
|
|
|
134
|
|
|
|
|
2598
|
|
4
|
134
|
|
|
134
|
|
1168
|
use Perl::Lint::Constants::Type; |
|
134
|
|
|
|
|
173
|
|
|
134
|
|
|
|
|
60800
|
|
5
|
134
|
|
|
134
|
|
599
|
use parent "Perl::Lint::Policy"; |
|
134
|
|
|
|
|
176
|
|
|
134
|
|
|
|
|
643
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
use constant { |
8
|
134
|
|
|
|
|
17308
|
DESC => q{Useless '## no critic' annotation}, |
9
|
|
|
|
|
|
|
EXPL => 'This annotation can be removed', |
10
|
134
|
|
|
134
|
|
6852
|
}; |
|
134
|
|
|
|
|
196
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub evaluate { |
13
|
4
|
|
|
4
|
0
|
8
|
my ($class, $file, $no_lint_lines, $used_no_lint_lines) = @_; |
14
|
|
|
|
|
|
|
|
15
|
4
|
|
|
|
|
3
|
my @violations; |
16
|
4
|
|
|
|
|
11
|
for my $line (keys %$no_lint_lines) { |
17
|
7
|
100
|
|
|
|
11
|
unless ($used_no_lint_lines->{$line}) { |
18
|
2
|
|
|
|
|
6
|
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
|
|
|
|
|
|
|
|