Condition Coverage

blib/lib/YAML/Tidy.pm
Criterion Covered Total %
condition 128 144 88.8


and 3 conditions

line !l l&&!r l&&r condition
68 15078 3024 3347 $level == -1 and $type eq "DOC"
89 10321 7 1 $self->partial && $level == 0
114 814 34 370 $parent->{'type'} eq "MAP" and not $node->{'index'} % 2
132 11113 5 2 $self->partial && $level == 0
139 3313 72 4395 $node->{'index'} % 2 and not $node->multiline
2797 93 7687 $parent->{'type'} eq "MAP" and ($node->{'index'} % 2 and not $node->multiline)
171 151 589 5591 $i == $startline and $col > 0
210 281 465 73 $startline < $endline and not $lines->[$startline] =~ tr/ /\000-\037!-\377/c
221 1 372 373 not $ignore_firstlevel and length $sp != $new_indent
226 755 18 132 not $line =~ tr/ /\000-\037!-\377/c and length $line <= length $sp
255 667 22 228 not $line =~ tr/ /\000-\037!-\377/c and length $line <= length $sp
281 619 522 0 $level == 0 and not $indenttoplevelscalar
317 8157 754 1508 defined $default_style and $node->{'style'} != $default_style
380 1304 1704 339 $node->open->{'implicit'} and $self->cfg->addheader
3008 0 339 $node->open->{'implicit'} and $self->cfg->addheader and not $self->partial
349 1704 955 $node->{'index'} == 1 and not $open->{'implicit'}
2053 796 159 $node->{'index'} == 1 and not $open->{'implicit'} and $self->cfg->removeheader
2500 0 159 $node->{'index'} == 1 and not $open->{'implicit'} and $self->cfg->removeheader and not $self->partial
393 84 54 3 not $child->is_collection and $child->empty_scalar
411 147 2669 531 $close->{'implicit'} and $self->cfg->addfooter
2816 0 531 $close->{'implicit'} and $self->cfg->addfooter and not $self->partial
2669 120 27 not $close->{'implicit'} and $self->cfg->removefooter
2789 0 27 not $close->{'implicit'} and $self->cfg->removefooter and not $self->partial
422 12 0 15 $next and $next->open->{'version_directive'} || $next->open->{'tag_directives'}
473 1024 284 97 $parent->{'type'} eq "MAP" and $node->{'index'} % 2
546 0 693 56 $start->{'column'} > 0 and substr($line, $start->{'column'} - 1, 1) eq ":"

or 2 conditions

line l !l condition
57 11304 11120 $node->{'type'} || ''
465 3996 0 $node->{'flow'} || 0
615 6911 176 $scalar ||= [$to, length $slice[-1], ""]
628 547 41 $offset ||= 0
718 4933 3347 $event->{'style'} // -1
3958 3347 $event->{'style'} // -1

or 3 conditions

line l !l&&r !l&&!r condition
28 21 1 0 delete $args{'cfg'} || 'YAML::Tidy::Config'->new
90 6371 1 3957 $level < 0 or $ignore_firstlevel
206 437 309 5281 $node->{'style'} eq 4 || $node->{'style'} eq 5
207 4525 213 543 $node->{'style'} == 1 or $node->{'style'} == 2
4738 543 0 $node->{'style'} == 1 or $node->{'style'} == 2 or $node->{'style'} == 3
269 750 391 4140 not $skipfirst or $node->multiline
323 58 0 1283 defined $node->{'anchor'} or $node->{'tag'}
341 18 132 1358 grep {$_ eq $value;} @all or $value =~ /($re)/u
343 148 1 1 $node->{'style'} eq 1 or $style eq 1
393 3 15 141 $open->{'version_directive'} or $open->{'tag_directives'}
15 3 138 $open->{'version_directive'} or $open->{'tag_directives'} or not $child->is_collection and $child->empty_scalar
422 6 9 0 $next->open->{'version_directive'} || $next->open->{'tag_directives'}
453 477 370 12141 $node->{'style'} eq 4 or $node->{'style'} eq 5
466 3021 975 0 $block_indent //= $parent->indent + $self->cfg->indent
540 42 180 527 $prev->is_collection or $prev->is_quoted
576 4690 0 0 $endcol || length $line
718 494 975 7305 $flow or ($event->{'style'} // -1) == 2
1469 0 7305 $flow or ($event->{'style'} // -1) == 2 or ($event->{'style'} // -1) == 2