« Perl/Lint/Policy/Miscellanea/ProhibitTies.pm
↑ Summary
Perl/Lint/Policy/Miscellanea/ProhibitUselessNoLint.pm »
| 1 | package Perl::Lint::Policy::Miscellanea::ProhibitUnrestrictedNoLint; | ||||||||||
| 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{Unrestricted '## no critic' annotation}, | |||||||||
| 9 | EXPL => 'Only disable the Policies you really need to disable', | ||||||||||
| 10 | 3 | }; | |||||||||
| 11 | |||||||||||
| 12 | 2 | ▶ | sub evaluate { | ||||||||
|
Subroutine
evaluate: called CC=3 SCAR=15.1
Pod
undocumented
| |||||||||||
| 13 | 2 | my ($class, $file, $tokens, $src, $args, $no_lint_lines) = @_; | |||||||||
| 14 | |||||||||||
| 15 | 2 | my @violations; | |||||||||
| 16 | my $no_lint; | ||||||||||
| 17 | 2 | for my $line (keys %$no_lint_lines) { | |||||||||
| 18 | 0 | $no_lint = $no_lint_lines->{$line}; | |||||||||
| 19 | |||||||||||
| 20 | 0 | ▶ | if (keys %$no_lint == 0) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 21 | 0 | push @violations, { | |||||||||
| 22 | filename => $file, | ||||||||||
| 23 | line => $line, | ||||||||||
| 24 | description => DESC, | ||||||||||
| 25 | explanation => EXPL, | ||||||||||
| 26 | policy => __PACKAGE__, | ||||||||||
| 27 | }; | ||||||||||
| 28 | } | ||||||||||
| 29 | } | ||||||||||
| 30 | |||||||||||
| 31 | 2 | return \@violations; | |||||||||
| 32 | } | ||||||||||
| 33 | |||||||||||
| 34 | 3 | 1; | |||||||||
| 35 | |||||||||||