Branch Coverage

blib/lib/Test2/Tools/PerlCritic.pm
Criterion Covered Total %
branch 57 58 98.2


line true false branch
26 7 19 if (is_plain_hashref($_[0]) and @_ == 1)
35 7 12 if (defined $_[0] and is_ref($_[0]))
36 1 6 if (is_plain_arrayref($_[0])) { }
1 5 elsif (is_plain_hashref($_[0])) { }
4 1 elsif (eval {
69 24 1 if (defined $files) { }
71 3 21 if (is_ref($files)) { }
73 0 3 unless (is_plain_arrayref($files))
91 21 3 unless (defined $self->test_name)
97 15 1 -d $_ ? :
9 16 if (-f $_) { }
119 3 3 is_blessed_ref($_[0]) && $_[0]->isa(__PACKAGE__) ? :
126 2 12 unless @critic_violations
128 3 9 if (my $hooks = $self->_hooks->{'violations'})
145 4 2 if (%violations)
149 2 2 if (my $hook = $self->_hooks->{'progressive_check'})
155 3 1 unless $violation->ok
160 3 3 if ($ok) { }
170 2 4 if (@note)
184 8 1 if ($name =~ /^(?:progressive_check|cleanup|violations)$/u)
186 7 1 if (is_plain_coderef($sub))
188 3 4 if ($name =~ /^(?:cleanup|violations)$/u) { }
194 1 3 if defined $self->_hooks->{$name}
246 4 8 if $file->progressive_allowed
249 3 5 if $first
271 8 4 unless $file->progressive_allowed
274 2 2 if $first
292 3 3 unless $file->ok
301 4 2 if (&$code($test_critic, $self->policy, $file->logical_filename, $file->count))