| 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
| |||||||||||
| 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 | |||||||||||