Condition Coverage

blib/lib/Perl/Tidy/VerticalAligner.pm
Criterion Covered Total %
condition 421 544 77.3


and 2 conditions

line l !l condition
1416 13 979 $self->check_fit($new_line, $base_line) and Deparse error: Can't locate object method "object_2svref" via package "B::SPECIAL" at /usr/local/lib/perl5/5.26.1/B/Deparse.pm line 5018.

and 3 conditions

line !l l&&!r l&&r condition
235 3 551 0 not $rOpts->{'valign-exclusion-list'} and $rOpts->{'valign-inclusion-list'}
647 7161 157 48 $jmax == 1 && $rtokens->[0] eq '#' && $rfields->[0] =~ /^\s*$/
654 3005 3729 632 $jmax == 0 && substr($rfields->[0], 0, 1) eq '#'
698 20 173 31 $cached_seqno and $rvertical_tightness_flags->{'_vt_seqno'}
173 27 4 $cached_seqno and $rvertical_tightness_flags->{'_vt_seqno'} and $rvertical_tightness_flags->{'_vt_seqno'} == $cached_seqno
712 0 1 3 $line_count >= $min_lines and $line_count <= $max_lines
723 205 8 11 $cached_line_type == 3 and not $self->group_line_count
213 0 11 $cached_line_type == 3 and not $self->group_line_count and $cached_line_opening_flag < 2
8 11 0 $cached_line_type == 3 and not $self->group_line_count and $cached_line_opening_flag < 2 and not $is_balanced_line
738 1277 3430 0 $group_maximum_line_length and $maximum_line_length != $group_maximum_line_length
4019 527 2 $is_block_comment and not $self->[11]
766 481 0 77 $is_block_comment and $outdent_long_lines
481 0 77 $is_block_comment and $outdent_long_lines and $leading_space_count == $self->[28]
783 7178 84 27 $break_alignment_before and @{$rgroup_lines;}
792 7273 3 13 $is_terminal_ternary and @{$rgroup_lines;}
806 7277 3 9 $rfields->[0] eq "else " and @{$rgroup_lines;}
7280 0 9 $rfields->[0] eq "else " and @{$rgroup_lines;} and $is_balanced_line
823 3921 14 337 @{$rgroup_lines;} and not get_recoverable_spaces($rgroup_lines->[0]{'indentation'})
841 3717 24 531 $is_block_comment and $outdent_long_lines
3741 0 531 $is_block_comment and $outdent_long_lines and not @{$rgroup_lines;}
1183 0 0 0 $jmax > 0 and $tokens[0] ne "#"
1396 1085 7 7 $ci_prev != $ci_new and $imax_align >= 0
1092 7 0 $ci_prev != $ci_new and $imax_align >= 0 and $ci_new == 0 || $group_line_count > 1
1944 129 20 45 $side_comment and $prev_comment
1994 0 0 2 $col_now and $pad > 0
0 1 1 $col_now and $pad > 0 and $pad <= $padding_available
2045 0 0 18 $imax_min < @{$rfield_lengths;} and $imax_min < @{$rfield_lengths_m;}
2058 2 0 16 $line_m->{'list_type'} and $line->{'list_type'}
2070 14 4 0 not $patterns_match and $lenmax > 2 * $lenmin
2168 76 70 233 $jend == $jbeg and $jend_m == $jbeg_m
146 8 225 $jend == $jbeg and $jend_m == $jbeg_m and $ng == 1 || $istop_mm < 0
8 5 220 $jend == $jbeg and $jend_m == $jbeg_m and $ng == 1 || $istop_mm < 0 and $ng == $ng_max || $istop < 0
5 1 219 $jend == $jbeg and $jend_m == $jbeg_m and $ng == 1 || $istop_mm < 0 and $ng == $ng_max || $istop < 0 and not $line->{'j_terminal_match'}
6 207 12 $jend == $jbeg and $jend_m == $jbeg_m and $ng == 1 || $istop_mm < 0 and $ng == $ng_max || $istop < 0 and not $line->{'j_terminal_match'} and $imax != $imax_m || $istop_m != $imax_m
2232 64 51 29 defined $ng_last and $ng_beg == $ng_last
115 0 29 defined $ng_last and $ng_beg == $ng_last and $i == $i_last
2296 0 10 108 defined $ngb and $nge > $ngb
2309 56 21 0 defined $rmax_move->{$ng} and $move > $rmax_move->{$ng}
77 0 0 defined $rmax_move->{$ng} and $move > $rmax_move->{$ng} and not $is_good_alignment_token{$raw_tok}
2394 141 3 0 defined $blocking_level[$ng] && $lev > $blocking_level[$ng]
2412 114 4 26 $jmax == $jmax_m && $it_stop_m == $jmax_m - 2
2424 41 72 31 $top_level and $is_good_alignment_token{$raw_tok}
3 110 0 defined $is_good_alignment_token{$raw_tok} and $lines_total > 2 || $group_list_type && $jmax < $jmax_m && $top_level
2449 44 74 0 ($lines_above == 1 || $lines_above == 2 && $lines_below >= 4) && $col_want > $col + $short_pad * $factor
2453 36 82 0 ($lines_below == 1 || $lines_below == 2 && $lines_above >= 4) && $col > $col_want + $short_pad * $factor
2518 0 0 469 defined $line_obj and defined $ridel
0 0 469 defined $line_obj and defined $ridel and @{$ridel;}
2591 466 2 1 defined $j_terminal_match and $jmin_del <= $j_terminal_match
2824 631 4011 516 not defined $i_eq and $raw_tok eq "="
2869 1030 247 36 $nr == 0 and $nl > 0
2890 1026 88 199 defined $i_eq_l and defined $i_eq_r
2896 0 5 194 $tok_eq_l eq $tok_eq_r and $i_eq_l == 0
5 0 194 $tok_eq_l eq $tok_eq_r and $i_eq_l == 0 and $i_eq_r == 0
5 193 1 $tok_eq_l eq $tok_eq_r and $i_eq_l == 0 and $i_eq_r == 0 and substr($pat_eq_l, 0, 1) ne substr($pat_eq_r, 0, 1) || $ci_jump
2977 532 9 4 substr($tok, 0, 1) eq "{" and $tok =~ /^\{\d+if/
3002 606 808 113 $nlines > 2 && $imax > 1
3067 3216 12 36 $deleted_assignment_token and $lev > $group_level || !$keep_after_deleted_assignment{$raw_tok}
3082 2141 1093 30 $jj == $jbeg and $has_terminal_match
3234 12 18 $jj == $jbeg and $has_terminal_match and $nlines == 2
3088 2499 44 721 $delete_me and $tok_count == 1
3096 207 41 14 defined $i_eq and $i < $i_eq
3104 582 33 106 $is_assignment{$raw_tok} and $lev == $group_level
3111 62 32 12 $imax > 0 and $i == $imax
3218 731 22 488 $list_type and $list_type eq $list_type_m
3458 523 406 81 $i > 0 and $lev < $last_lev
3490 236 245 142 $all_monotonic and $tok_end =~ /^,/
3492 97 45 93 $ii >= 0 and fat_comma_to_comma($rtokens->[$ii]) eq $tok_end
3706 93 66 75 $jl >= 0 and defined $match_tree[$depth]
159 0 75 $jl >= 0 and defined $match_tree[$depth] and @{$match_tree[$depth];}
66 6 69 $jl >= 0 and defined $match_tree[$depth] and @{$match_tree[$depth];} and defined $levels_current[$depth]
3729 64 50 0 $depth > 0 and $levels_next[$depth] <= $levels_next[$depth - 1]
3805 4 4 245 $def_current && $def_next
3811 23 0 23 $depth > 0 and defined $match_tree[$depth - 1]
4081 0 20 136 $raw_tok and $lev == $group_level
4090 151 4 1 $j == $jmax_1 - 2 && $raw_tok eq '=>' && $$rfield_lengths_0[$j + 1] <= 3
4100 49 0 73 $raw_tok eq "=" and $lev == $group_level
4110 31 1 124 $is_good_alignment{$raw_tok} and not $line_ending_fat_comma
4139 33 94 0 $is_marginal == 0 and $line_ending_fat_comma
4152 106 17 4 $is_marginal == 1 and $saw_good_alignment || $max_pad < 3
4189 100 9 1 ($raw_tokb eq '(' || $raw_tokb eq '{') && $jmax_1 == 2 && $sc_term0 ne $sc_term1
4244 0 0 0 $sc_term1 and $sc_term0
4265 0 0 4 $sc_term0 and $sc_term1
4271 4 1 13 $is_marginal and defined $jfirst_bad
5 13 0 $is_marginal and defined $jfirst_bad and $imax_align > $jfirst_bad - 1
4281 0 5 13 $imax_align < 0 and defined $j0_eq_pad
4283 13 0 0 $imax_next >= 0 || $imax_prev >= 0 || 0 and $j0_eq_pad >= -$j0_max_pad
13 0 0 $imax_next >= 0 || $imax_prev >= 0 || 0 and $j0_eq_pad >= -$j0_max_pad and $j0_eq_pad <= $j0_max_pad
4348 0 0 376 @{$rlines;} and @{$rgroups;}
4390 4 28 0 $ngroups > 1 and $spaces < 0
4464 99 5 18 $level < $last_sc_level and $is_closing_block_type{substr $rfields->[0], 0, 1}
4512 143 43 13 $self->[16] > 0 && $group_level == $self->[13]
4588 228 49 4 $PASS < $MAX_PASS and $is_hanging_side_comment
4612 192 14 71 $move >= 0 and $j_sc_beg == 0
206 68 3 $move >= 0 and $j_sc_beg == 0 and $continuing_sc_flow
4637 26 0 23 $col > $max_comment_column and $col < $column_limit
4740 4205 325 2736 $j == $maximum_field_index and !defined($rfields->[$j]) || $rfield_lengths->[$j] == 0
4759 4489 32 9 $self->[8] and $j == $maximum_field_index
4993 0 14 0 defined $open_or_close and $open_or_close == 1
5006 12 18 0 $gap >= 0 and $maximum_line_length != $cached_line_maximum_length || defined $level_end && $level > $level_end
5021 12 0 18 $gap >= 0 and defined $seqno_beg
5050 0 1 36 $seqno_beg and $open_or_close == $cached_line_type || $cached_line_type == 2 && $open_or_close == 4 || !$open_or_close && $cached_line_type == 2
1 3 33 $seqno_beg and $open_or_close == $cached_line_type || $cached_line_type == 2 && $open_or_close == 4 || !$open_or_close && $cached_line_type == 2 and $test_line_length <= $cached_line_maximum_length
5104 16 13 4 $str =~ /^\);/ and $cached_line_text =~ /^[\)\}\]\s]*$/
5130 0 0 4 $diff > 0 and length $seqno_string
0 1 3 $diff > 0 and length $seqno_string and length $last_nonblank_seqno_string == length $seqno_string
5138 0 0 3 @seqno_now and @seqno_last
0 0 3 @seqno_now and @seqno_last and $seqno_now[-1] == $seqno_last[0]
0 0 3 @seqno_now and @seqno_last and $seqno_now[-1] == $seqno_last[0] and $seqno_now[0] == $seqno_last[-1]
5148 0 0 3 length $ws == $diff and $ws =~ /^\s+$/
5329 148 11 0 $open_or_close == 3 and not $line =~ /\{\s*$/
154 5 0 $open_or_close == 4 and not $line =~ /\}\s*$/
5410 1 0 2 $valign_buffer_filling and $diff
5416 0 0 7 length $ws == $diff and $ws =~ /^\s+$/
5450 6921 392 2 $seqno_string and $valign_buffer_filling
5469 353 31 10 index($seqno_string, ":") >= 0 and $seqno_string =~ /^\d+(\:+\d+)+$/
384 2 8 index($seqno_string, ":") >= 0 and $seqno_string =~ /^\d+(\:+\d+)+$/ and not $args_to_D[0] =~ /^[\}\)\]\:\?]/

or 2 conditions

line l !l condition
715 0 3 $rvertical_tightness_flags->{'_vt_valid_flag'} ||= 1
3060 127 5 $delete_me ||= 1
3073 29 12 $delete_me ||= 1
4283 0 13 $imax_next >= 0 || $imax_prev >= 0 || 0

or 3 conditions

line l !l&&r !l&&!r condition
294 0 0 0 $error ||= @missing_keys
738 2659 0 4707 $level != $group_level or $group_maximum_line_length and $maximum_line_length != $group_maximum_line_length
0 159 4548 $level != $group_level or $group_maximum_line_length and $maximum_line_length != $group_maximum_line_length or $is_outdented
159 2 4546 $level != $group_level or $group_maximum_line_length and $maximum_line_length != $group_maximum_line_length or $is_outdented or $is_block_comment and not $self->[11]
3997 9 13 $is_block_comment || $self->[12] || $self->[10]
2 13 4533 $level != $group_level or $group_maximum_line_length and $maximum_line_length != $group_maximum_line_length or $is_outdented or $is_block_comment and not $self->[11] or not $is_block_comment || $self->[12] || $self->[10]
829 304 4 29 $rgroup_lines->[0]{'jmax'} > 1 or $self->[26] > 3
855 43 1 3697 @{$rgroup_lines;} or get_recoverable_spaces($indentation)
884 44 2692 325 $jmax == 0 or $$rtokens[$jmax - 1] ne "#"
945 40 79 2922 $level_end < $level or $is_closing_token{substr $rfields->[0], 0, 1}
1396 0 0 7 $ci_new == 0 || $group_line_count > 1
1973 0 1 2 $fixit ||= $match_code
1978 0 1 1 $fixit ||= $nlines <= 1
2168 147 78 8 $ng == 1 || $istop_mm < 0
145 75 5 $ng == $ng_max || $istop < 0
66 7 146 $imax != $imax_m || $istop_m != $imax_m
2186 2 16 3 $rtokens->[0] =~ /^=\d/ or $list_type
2424 59 0 51 $lines_total > 2 || $group_list_type && $jmax < $jmax_m && $top_level
2449 0 0 118 $is_big_gap ||= ($lines_above == 1 || $lines_above == 2 && $lines_below >= 4) && $col_want > $col + $short_pad * $factor
2453 0 0 118 $is_big_gap ||= ($lines_below == 1 || $lines_below == 2 && $lines_above >= 4) && $col > $col_want + $short_pad * $factor
2465 5 5 134 $col_want > $col_max or $col > $col_limit
10 0 134 $col_want > $col_max or $col > $col_limit or $is_big_gap
5 0 134 $col_want > $col_max or $col > $col_limit or $is_big_gap or $is_blocked
2608 19 25 32 not $old_list_type or $old_list_type ne $new_list_type
2814 0 64 1641 $saw_side_comment ||= $length
2896 11 1 182 substr($pat_eq_l, 0, 1) ne substr($pat_eq_r, 0, 1) || $ci_jump
2977 17 23 522 substr($tok, 0, 1) eq "?" or substr($tok, 0, 1) eq "{" and $tok =~ /^\{\d+if/
3002 367 113 1414 $saw_large_group ||= $nlines > 2 && $imax > 1
3015 1754 780 730 defined $il || defined $ir
3024 1 16 14 $delete_me ||= !$align_ok
3035 15 81 24 $saw_dividing_token ||= $tok eq $dividing_token
3043 3 0 7 $nlines < 5 || !$saw_dividing_token
17 3 7 $delete_me ||= $nlines < 5 || !$saw_dividing_token
3067 9 32 7 $lev > $group_level || !$keep_after_deleted_assignment{$raw_tok}
3122 661 0 2603 $delete_me ||= !$align_ok
3131 529 0 132 not defined $delete_above_level or $lev < $delete_above_level
3729 120 0 114 not defined $levels_next[$depth] or $depth > 0 and $levels_next[$depth] <= $levels_next[$depth - 1]
3804 249 4 148 $def_current or $def_next
3805 8 38 207 not $def_current && $def_next or $token_patterns_current[$depth] ne $token_patterns_next[$depth]
3843 32 3 15 not defined $np_now or $np != $np_now
4041 6 113 135 defined $line_1->{'j_terminal_match'} or $line_0->{'list_type'}
113 8 127 defined $line_1->{'j_terminal_match'} or $line_0->{'list_type'} or $line_1->{'is_hanging_side_comment'}
4083 1 8 127 $saw_if_or ||= $is_if_or{$raw_tok}
4152 13 4 4 $saw_good_alignment || $max_pad < 3
4162 0 0 127 $jmax_0 < 1 or $jmax_1 < 1
4173 16 83 28 $is_marginal or $sc_term0
4189 17 1 109 $is_marginal ||= ($raw_tokb eq '(' || $raw_tokb eq '{') && $jmax_1 == 2 && $sc_term0 ne $sc_term1
4238 0 0 0 $pat0 ne $pat1 || $line_ending_fat_comma
4323 0 0 0 $rpatterns_0->[0] =~ /,/ or $rpatterns_1->[0] =~ /,/
4393 13 0 19 $ng == 0 or $spaces < $extra_leading_spaces
4455 60 7 122 $line_diff > $short_diff or not $self->[12]
4481 0 0 4 $cached_line_type == 2 or $cached_line_type == 4
4740 0 2736 325 !defined($rfields->[$j]) || $rfield_lengths->[$j] == 0
4974 19 11 37 $cached_line_type == 1 or $cached_line_type == 3
5006 0 0 18 $maximum_line_length != $cached_line_maximum_length || defined $level_end && $level > $level_end
5050 0 27 1 $open_or_close == $cached_line_type || $cached_line_type == 2 && $open_or_close == 4 || !$open_or_close && $cached_line_type == 2
5329 0 0 159 $open_or_close == 3 and not $line =~ /\{\s*$/ or $open_or_close == 4 and not $line =~ /\}\s*$/
5339 7207 0 159 not $open_or_close or $side_comment_length > 0
7207 0 159 not $open_or_close or $side_comment_length > 0 or $is_outdented_line
0 0 159 not $open_or_close or $side_comment_length > 0 or $is_outdented_line or not $line_length
5532 0 45 4270 $rOpts_tabs || $rOpts_entab_leading_whitespace
4270 0 45 not $rOpts_tabs || $rOpts_entab_leading_whitespace or $rOpts_indent_columns <= 0