« Perl/Lint/Policy/RegularExpressions/RequireDotMatchAnything.pm
↑ Summary
Perl/Lint/Policy/ControlStructures/ProhibitDeepNests.pm »
| 1 | package Perl::Lint::Policy::RegularExpressions::RequireLineBoundaryMatching; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 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 => 'Regular expression without "/m" flag', | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 9 | EXPL => [237], | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 10 | 3 | }; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 11 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 12 | 2 | ▶ | sub evaluate { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
evaluate: called CC=41 SCAR=60.6
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 13 | 2 | my ($class, $file, $tokens, $src, $args) = @_; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 14 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 15 | 2 | my @violations; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 16 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 17 | 2 | my $depth = 0; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 18 | 2 | my $is_non_target_reg = 0; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 19 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 20 | 2 | my $enabled_re_m_depth = -1; # use negative value as default | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 21 | 2 | my @enabled_re_m_depths; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 22 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 23 | 2 | my $disable_re_m_depth = -1; # use negative value as default | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 24 | 2 | my @disable_re_m_depths; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 25 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 26 | 2 | ▶ | for (my $i = 0; my $token = $tokens->[$i]; $i++) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 27 | 51 | my $token_type = $token->{type}; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 28 | 51 | my $token_data = $token->{data}; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 29 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 30 | 51 | my $next_token = $tokens->[$i+1]; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 31 | 51 | my $next_token_type = $next_token->{type}; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 32 | 51 | my $next_token_data = $next_token->{data}; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 33 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 34 | 51 | ▶ | if (!$is_non_target_reg && $token_type == REG_DELIM) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition66%2/3
not $is_non_target_reg and $token_type == 151
MC/DC0%0/2
not $is_non_target_reg and $token_type == 151
not $is_non_target_reg
$token_type == 151
Truth table66%2/3
not(A) and B
A= not $is_non_target_regB= $token_type == 151
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 35 | 0 | ▶ | if ( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/9
defined $next_token_type and $next_token_type == 106 || $next_token_type == 144 && !($next_token_data =~ /m/)
$next_token_type == 106 or $next_token_type == 144 and not $next_token_data =~ /m/
$next_token_type == 144 and not $next_token_data =~ /m/
MC/DC0%0/4
defined $next_token_type and $next_token_type == 106 || $next_token_type == 144 && !($next_token_data =~ /m/)
defined $next_token_type
$next_token_type == 106
$next_token_type == 144
not $next_token_data =~ /m/
Truth table0%0/5
A and B or C and not(D)
A= defined $next_token_typeB= $next_token_type == 106C= $next_token_type == 144D= not $next_token_data =~ /m/
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 36 | defined $next_token_type && | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 37 | ( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 38 | $next_token_type == SEMI_COLON || # when any regex options don't exist | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 39 | ($next_token_type == REG_OPT && $next_token_data !~ /m/) # when the `m` regex option doesn't exist | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 40 | ) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 41 | ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 42 | 0 | ▶ | if ( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/9
not $enabled_re_m_depth >= 0 && $depth >= $enabled_re_m_depth or $disable_re_m_depth >= 0 and $disable_re_m_depth > $enabled_re_m_depth
$enabled_re_m_depth >= 0 && $depth >= $enabled_re_m_depth
$disable_re_m_depth >= 0 and $disable_re_m_depth > $enabled_re_m_depth
MC/DC0%0/4
not $enabled_re_m_depth >= 0 && $depth >= $enabled_re_m_depth or $disable_re_m_depth >= 0 and $disable_re_m_depth > $enabled_re_m_depth
$enabled_re_m_depth >= 0
$depth >= $enabled_re_m_depth
$disable_re_m_depth >= 0
$disable_re_m_depth > $enabled_re_m_depth
Truth table0%0/5
not(A && B) or C and D
A= $enabled_re_m_depth >= 0B= $depth >= $enabled_re_m_depthC= $disable_re_m_depth >= 0D= $disable_re_m_depth > $enabled_re_m_depth
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 43 | !($enabled_re_m_depth >= 0 && $depth >= $enabled_re_m_depth) || | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 44 | ($disable_re_m_depth >= 0 && $disable_re_m_depth > $enabled_re_m_depth) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 45 | ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 46 | push @violations, { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 47 | filename => $file, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 48 | line => $token->{line}, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 49 | 0 | description => DESC, | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 50 | explanation => EXPL, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 51 | policy => __PACKAGE__, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 52 | }; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 53 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 54 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 55 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 56 | 0 | next; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 57 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 58 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 59 | # Ignore regexes which are unnecessary to check | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 60 | # XXX more? | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 61 | 51 | ▶ | if ( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition66%6/9
$token_type == 154 or $token_type == 147 or $token_type == 145 or $token_type == 148
$token_type == 154 or $token_type == 147 or $token_type == 145
$token_type == 154 or $token_type == 147
MC/DC25%1/4
$token_type == 154 or $token_type == 147 or $token_type == 145 or $token_type == 148
$token_type == 154
$token_type == 147
$token_type == 145
$token_type == 148
Truth table40%2/5
A or B or C or D
A= $token_type == 154B= $token_type == 147C= $token_type == 145D= $token_type == 148
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 62 | $token_type == REG_ALL_REPLACE || | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 63 | $token_type == REG_LIST || | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 64 | $token_type == REG_QUOTE || | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 65 | $token_type == REG_EXEC | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 66 | ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 67 | 2 | $is_non_target_reg = 1; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 68 | 2 | next; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 69 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 70 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 71 | 49 | ▶ | if ($token_type == SEMI_COLON) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 72 | 11 | $is_non_target_reg = 0; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 73 | 11 | next; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 74 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 75 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 76 | # Represent block scope hierarchy | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 77 | 38 | ▶ | if ($token_type == LEFT_BRACE) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 78 | 1 | $depth++; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 79 | 1 | next; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 80 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 81 | 37 | ▶ | if ($token_type == RIGHT_BRACE) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 82 | 1 | ▶ | if ($enabled_re_m_depth == $depth) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 83 | 0 | pop @enabled_re_m_depths; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 84 | 0 | ▶ | $enabled_re_m_depth = $enabled_re_m_depths[-1] // -1; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/2
$enabled_re_m_depths[-1] // -1
MC/DC0%0/1
$enabled_re_m_depths[-1] // -1
$enabled_re_m_depths[-1]
Truth table0%0/2
A
A= $enabled_re_m_depths[-1]
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 85 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 86 | 1 | ▶ | if ($disable_re_m_depth == $depth) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 87 | 0 | pop @disable_re_m_depths; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 88 | 0 | ▶ | $disable_re_m_depth = $disable_re_m_depths[-1] // -1; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/2
$disable_re_m_depths[-1] // -1
MC/DC0%0/1
$disable_re_m_depths[-1] // -1
$disable_re_m_depths[-1]
Truth table0%0/2
A
A= $disable_re_m_depths[-1]
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 89 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 90 | 1 | $depth--; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 91 | 1 | next; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 92 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 93 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 94 | # for | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 95 | # `use re qw{/m}` | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 96 | # `use re '/m'` | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 97 | 36 | ▶ | if ($token_type == USED_NAME && $token_data eq 're') { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition66%2/3
$token_type == 94 and $token_data eq "re"
MC/DC0%0/2
$token_type == 94 and $token_data eq "re"
$token_type == 94
$token_data eq "re"
Truth table66%2/3
A and B
A= $token_type == 94B= $token_data eq "re"
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 98 | 0 | ▶ | for ($i++; $token = $tokens->[$i]; $i++) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 99 | 0 | $token_type = $token->{type}; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 100 | 0 | $token_data = $token->{data}; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 101 | 0 | ▶ | if ($token_type == SEMI_COLON) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 102 | 0 | last; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 103 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 104 | 0 | ▶ | if ( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/9
$token_type == 173 || $token_type == 172 || $token_type == 187 and $token_data =~ /m/
$token_type == 173 or $token_type == 172 or $token_type == 187
$token_type == 173 or $token_type == 172
MC/DC0%0/4
$token_type == 173 || $token_type == 172 || $token_type == 187 and $token_data =~ /m/
$token_type == 173
$token_type == 172
$token_type == 187
$token_data =~ /m/
Truth table0%0/7
A or B or C and D
A= $token_type == 173B= $token_type == 172C= $token_type == 187D= $token_data =~ /m/
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 105 | ($token_type == RAW_STRING || $token_type == STRING || $token_type == REG_EXP) && | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 106 | $token_data =~ /m/ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 107 | ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 108 | 0 | push @enabled_re_m_depths, $depth; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 109 | 0 | $enabled_re_m_depth = $depth; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 110 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 111 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 112 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 113 | 0 | next; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 114 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 115 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 116 | # for | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 117 | # `no re qw{/m}` | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 118 | # `no re '/m'` | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 119 | 36 | ▶ | if ( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition44%4/9
$token_type == 70 and $token_data eq "no" and $next_token_type == 122 and $next_token_data eq "re"
$token_type == 70 and $token_data eq "no" and $next_token_type == 122
$token_type == 70 and $token_data eq "no"
MC/DC0%0/4
$token_type == 70 and $token_data eq "no" and $next_token_type == 122 and $next_token_data eq "re"
$token_type == 70
$token_data eq "no"
$next_token_type == 122
$next_token_data eq "re"
Truth table40%2/5
A and B and C and D
A= $token_type == 70B= $token_data eq "no"C= $next_token_type == 122D= $next_token_data eq "re"
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 120 | $token_type == BUILTIN_FUNC && | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 121 | $token_data eq 'no' && | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 122 | $next_token_type == KEY && | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 123 | $next_token_data eq 're' | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 124 | ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 125 | 0 | ▶ | for ($i++; $token = $tokens->[$i]; $i++) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 126 | 0 | $token_type = $token->{type}; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 127 | 0 | $token_data = $token->{data}; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 128 | 0 | ▶ | if ($token_type == SEMI_COLON) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 129 | 0 | last; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 130 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 131 | 0 | ▶ | if ( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/9
$token_type == 173 || $token_type == 172 || $token_type == 187 and $token_data =~ /m/
$token_type == 173 or $token_type == 172 or $token_type == 187
$token_type == 173 or $token_type == 172
MC/DC0%0/4
$token_type == 173 || $token_type == 172 || $token_type == 187 and $token_data =~ /m/
$token_type == 173
$token_type == 172
$token_type == 187
$token_data =~ /m/
Truth table0%0/7
A or B or C and D
A= $token_type == 173B= $token_type == 172C= $token_type == 187D= $token_data =~ /m/
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 132 | ($token_type == RAW_STRING || $token_type == STRING || $token_type == REG_EXP) && | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 133 | $token_data =~ /m/ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 134 | ) { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 135 | 0 | push @disable_re_m_depths, $depth; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 136 | 0 | $disable_re_m_depth = $depth; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 137 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 138 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 139 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 140 | 0 | next; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 141 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 142 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 143 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 144 | 2 | return \@violations; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 145 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 146 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 147 | 3 | 1; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 148 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||