Perl/Lint/Policy/Miscellanea/ProhibitUselessNoLint.pm

filter: Statementstmt 90.9% 20 / 22 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 6 / 6 Podpod 0.0% 0 / 1 totaltotal 83.8% 26 / 31 CC 3 SCAR 7.8
CC
3
Cov
83%
evaluate
4.1
BEGIN
1.0
BEGIN
1.0
CRAP 2.2
« Perl/Lint/Policy/Miscellanea/ProhibitUnrestrictedNoLint.pm ↑ Summary Perl/Lint/Policy.pm »
1 package Perl::Lint::Policy::Miscellanea::ProhibitUselessNoLint;
2 3 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 3 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 3 ▶use Perl::Lint::Constants::Type;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 3 ▶use parent "Perl::Lint::Policy";
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 3 ▶use constant {
Subroutine BEGIN: called CC=1 SCAR=0.0
8 3 DESC => q{Useless '## no critic' annotation},
9 EXPL => 'This annotation can be removed',
10 3 };
11  
12 2 ▶sub evaluate {
Subroutine evaluate: called CC=3 SCAR=14.2
Pod undocumented
13 2 my ($class, $file, $no_lint_lines, $used_no_lint_lines) = @_;
14  
15 2 my @violations;
16 2 for my $line (keys %$no_lint_lines) {
17 0 ▶ unless ($used_no_lint_lines->{$line}) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($used_no_lint_lines->{$line}) 0 0 0
18 0 push @violations, {
19 filename => $file,
20 line => $line,
21 description => DESC,
22 explanation => EXPL,
23 policy => __PACKAGE__,
24 };
25 }
26 }
27  
28 2 return \@violations;
29 }
30  
31 3 1;
32  
« Perl/Lint/Policy/Miscellanea/ProhibitUnrestrictedNoLint.pm ↑ Summary Perl/Lint/Policy.pm »