« Perl/Lint/Policy/ValuesAndExpressions/ProhibitMagicNumbers.pm
↑ Summary
Perl/Lint/Policy/InputOutput/RequireCheckedClose.pm »
| 1 | package Perl::Lint::Policy::TestingAndDebugging::RequireTestLabels; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2 | 2 | ▶ | use strict; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3 | 2 | ▶ | use warnings; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4 | 2 | ▶ | use List::Util qw/any/; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5 | 2 | ▶ | use Perl::Lint::Constants::Type; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 6 | 2 | ▶ | use parent "Perl::Lint::Policy"; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 7 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 8 | 2 | ▶ | use constant { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 9 | 2 | DESC => 'Test without a label', | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 10 | EXPL => 'Add a label argument to all Test::More functions', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 11 | 2 | }; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 12 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 13 | 0 | ▶ | sub evaluate { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
evaluate: not called CC=43 SCAR=75.5
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 14 | 0 | my ($class, $file, $tokens, $src, $args) = @_; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 15 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 16 | 0 | my @target_test_module = ('Test::More'); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 17 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 18 | 0 | ▶ | if (my $this_policies_arg = $args->{require_test_labels}) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 19 | 0 | ▶ | push @target_test_module, split / /, ($this_policies_arg->{modules} || ''); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/2
$this_policies_arg->{'modules'} || ''
MC/DC0%0/1
$this_policies_arg->{'modules'} || ''
$this_policies_arg->{'modules'}
Truth table0%0/2
A
A= $this_policies_arg->{'modules'}
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 20 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 21 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 22 | 0 | my @violations; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 23 | 0 | my $is_loaded = 0; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 24 | 0 | my $token_num = scalar @$tokens; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 25 | 0 | ▶ | for (my $i = 0; $i < $token_num; $i++) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 26 | 0 | my $token = $tokens->[$i]; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 27 | 0 | my $token_type = $token->{type}; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 28 | 0 | my $token_data = $token->{data}; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 29 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 30 | # for checking Test::More is loaded | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 31 | 0 | ▶ | if ($token_type == USE_DECL || $token_type == REQUIRE_DECL) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
$token_type == 93 or $token_type == 71
MC/DC0%0/2
$token_type == 93 or $token_type == 71
$token_type == 93
$token_type == 71
Truth table0%0/3
A or B
A= $token_type == 93B= $token_type == 71
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 32 | 0 | ▶ | next if $is_loaded; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 33 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 34 | 0 | my $used_module_name = ''; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 35 | 0 | ▶ | for ($i++; $i < $token_num; $i++) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 36 | 0 | my $token = $tokens->[$i]; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 37 | 0 | my $token_type = $token->{type}; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 38 | 0 | ▶ | if ($token_type == NAMESPACE || $token_type == NAMESPACE_RESOLVER) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
$token_type == 127 or $token_type == 126
MC/DC0%0/2
$token_type == 127 or $token_type == 126
$token_type == 127
$token_type == 126
Truth table0%0/3
A or B
A= $token_type == 127B= $token_type == 126
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 39 | 0 | $used_module_name .= $token->{data}; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 40 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 41 | else { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 42 | 0 | last; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 43 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 44 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 45 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 46 | 0 | ▶ | if (any {$_ eq $used_module_name} @target_test_module) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 47 | 0 | $is_loaded = 1; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 48 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 49 | 0 | next; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 50 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 51 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 52 | 0 | ▶ | if ($token_type == KEY) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 53 | 0 | ▶ | if ($token_data eq 'pass' || $token_data eq 'fail') { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
$token_data eq "pass" or $token_data eq "fail"
MC/DC0%0/2
$token_data eq "pass" or $token_data eq "fail"
$token_data eq "pass"
$token_data eq "fail"
Truth table0%0/3
A or B
A= $token_data eq "pass"B= $token_data eq "fail"
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 54 | 0 | ▶ | if ( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/6
$$tokens[$i + 1]{"type"} == 106 or $$tokens[$i + 1]{"type"} == 107 and $$tokens[$i + 2]{"type"} == 108
$$tokens[$i + 1]{"type"} == 107 and $$tokens[$i + 2]{"type"} == 108
MC/DC0%0/3
$$tokens[$i + 1]{"type"} == 106 or $$tokens[$i + 1]{"type"} == 107 and $$tokens[$i + 2]{"type"} == 108
$$tokens[$i + 1]{"type"} == 106
$$tokens[$i + 1]{"type"} == 107
$$tokens[$i + 2]{"type"} == 108
Truth table0%0/4
A or B and C
A= $$tokens[$i + 1]{"type"} == 106B= $$tokens[$i + 1]{"type"} == 107C= $$tokens[$i + 2]{"type"} == 108
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 55 | $tokens->[$i+1]->{type} == SEMI_COLON || | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 56 | ( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 57 | $tokens->[$i+1]->{type} == LEFT_PAREN && | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 58 | $tokens->[$i+2]->{type} == RIGHT_PAREN | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 59 | ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 60 | ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 61 | push @violations, { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 62 | filename => $file, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 63 | line => $token->{line}, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 64 | 0 | description => DESC, | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 65 | explanation => EXPL, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 66 | policy => __PACKAGE__, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 67 | }; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 68 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 69 | 0 | next; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 70 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 71 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 72 | 0 | my $expected_commma_num = 0; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 73 | 0 | ▶ | if ($token_data eq 'ok') { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 3 branches
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 74 | 0 | $expected_commma_num = 1; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 75 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 76 | elsif ($token_data eq 'cmp_ok') { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 77 | 0 | $expected_commma_num = 3; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 78 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 79 | ▶ | elsif ( | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/12
$token_data eq "is" or $token_data eq "isnt" or $token_data eq "like" or $token_data eq "unlike" or $token_data eq "is_deeply"
$token_data eq "is" or $token_data eq "isnt" or $token_data eq "like" or $token_data eq "unlike"
$token_data eq "is" or $token_data eq "isnt" or $token_data eq "like"
$token_data eq "is" or $token_data eq "isnt"
MC/DC0%0/5
$token_data eq "is" or $token_data eq "isnt" or $token_data eq "like" or $token_data eq "unlike" or $token_data eq "is_deeply"
$token_data eq "is"
$token_data eq "isnt"
$token_data eq "like"
$token_data eq "unlike"
$token_data eq "is_deeply"
Truth table0%0/6
A or B or C or D or E
A= $token_data eq "is"B= $token_data eq "isnt"C= $token_data eq "like"D= $token_data eq "unlike"E= $token_data eq "is_deeply"
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 80 | $token_data eq 'is' || | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 81 | $token_data eq 'isnt' || | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 82 | $token_data eq 'like' || | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 83 | $token_data eq 'unlike' || | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 84 | $token_data eq 'is_deeply' | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 85 | ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 86 | 0 | $expected_commma_num = 2; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 87 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 88 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 89 | 0 | ▶ | if ($expected_commma_num) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 90 | 0 | my $left_paren_num = 0; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 91 | 0 | my $left_brace_num = 0; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 92 | 0 | my $left_bracket_num = 0; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 93 | 0 | my $comma_num = 0; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 94 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 95 | 0 | ▶ | $i++ if $tokens->[$i+1]->{type} == LEFT_PAREN; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 96 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 97 | 0 | ▶ | for ($i++; $i < $token_num; $i++) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 98 | 0 | my $token = $tokens->[$i]; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 99 | 0 | my $token_type = $token->{type}; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 100 | 0 | my $token_data = $token->{data}; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 101 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 102 | 0 | ▶ | if ($token_type == LEFT_PAREN) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 8 branches
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 103 | 0 | $left_paren_num++; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 104 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 105 | elsif ($token_type == LEFT_BRACE) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 106 | 0 | $left_brace_num++; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 107 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 108 | elsif ($token_type == LEFT_BRACKET) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 109 | 0 | $left_bracket_num++; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 110 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 111 | elsif ($token_type == RIGHT_PAREN) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 112 | 0 | $left_paren_num--; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 113 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 114 | elsif ($token_type == RIGHT_BRACE) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 115 | 0 | $left_brace_num--; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 116 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 117 | elsif ($token_type == RIGHT_BRACKET) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 118 | 0 | $left_bracket_num--; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 119 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 120 | ▶ | elsif ( | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/9
$token_type == 104 and $left_paren_num <= 0 and $left_brace_num <= 0 and $left_bracket_num <= 0
$token_type == 104 and $left_paren_num <= 0 and $left_brace_num <= 0
$token_type == 104 and $left_paren_num <= 0
MC/DC0%0/4
$token_type == 104 and $left_paren_num <= 0 and $left_brace_num <= 0 and $left_bracket_num <= 0
$token_type == 104
$left_paren_num <= 0
$left_brace_num <= 0
$left_bracket_num <= 0
Truth table0%0/5
A and B and C and D
A= $token_type == 104B= $left_paren_num <= 0C= $left_brace_num <= 0D= $left_bracket_num <= 0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 121 | $token_type == COMMA && | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 122 | $left_paren_num <= 0 && | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 123 | $left_brace_num <= 0 && | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 124 | $left_bracket_num <= 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 125 | ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 126 | 0 | $comma_num++; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 127 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 128 | ▶ | elsif ( | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/9
$token_type == 106 and $left_paren_num <= 0 and $left_brace_num <= 0 and $left_bracket_num <= 0
$token_type == 106 and $left_paren_num <= 0 and $left_brace_num <= 0
$token_type == 106 and $left_paren_num <= 0
MC/DC0%0/4
$token_type == 106 and $left_paren_num <= 0 and $left_brace_num <= 0 and $left_bracket_num <= 0
$token_type == 106
$left_paren_num <= 0
$left_brace_num <= 0
$left_bracket_num <= 0
Truth table0%0/5
A and B and C and D
A= $token_type == 106B= $left_paren_num <= 0C= $left_brace_num <= 0D= $left_bracket_num <= 0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 129 | $token_type == SEMI_COLON && | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 130 | $left_paren_num <= 0 && | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 131 | $left_brace_num <= 0 && | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 132 | $left_bracket_num <= 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 133 | ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 134 | 0 | ▶ | if ($comma_num < $expected_commma_num) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 135 | push @violations, { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 136 | filename => $file, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 137 | line => $token->{line}, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 138 | 0 | description => DESC, | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 139 | explanation => EXPL, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 140 | policy => __PACKAGE__, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 141 | }; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 142 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 143 | 0 | last; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 144 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 145 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 146 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 147 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 148 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 149 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 150 | 0 | ▶ | return \@violations if $is_loaded; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 151 | 0 | return []; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 152 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 153 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 154 | 2 | 1; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 155 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||