Condition Coverage

blib/lib/Perl/Tidy/VerticalAligner.pm
Criterion Covered Total %
condition 522 692 75.4


and 2 conditions

line l !l condition
1534 14 1127 $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.42.0/B/Deparse.pm line 5762.

and 3 conditions

line !l l&&!r l&&r condition
292 3 644 0 not $rOpts->{'valign-exclusion-list'} and $rOpts->{'valign-inclusion-list'}
338 645 0 2 ($rOpts_tabs || $rOpts_entab_leading_whitespace) && $rOpts_indent_columns > 0
714 8176 173 50 $jmax == 1 && $rtokens->[0] eq '#' && $rfields->[0] =~ /^\s*$/
721 3485 4203 711 $jmax == 0 && substr($rfields->[0], 0, 1) eq '#'
765 16 110 31 $cached_seqno and $rvertical_tightness_flags->{'_vt_seqno'}
110 27 4 $cached_seqno and $rvertical_tightness_flags->{'_vt_seqno'} and $rvertical_tightness_flags->{'_vt_seqno'} == $cached_seqno
779 0 1 3 $line_count >= $min_lines and $line_count <= $max_lines
790 208 8 11 $cached_line_type == 3 and not $self->group_line_count
216 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
805 1561 3802 0 $group_maximum_line_length and $maximum_line_length != $group_maximum_line_length
4598 599 2 $is_block_comment and not $rOpts_valign_block_comments
834 509 0 90 $is_block_comment and $outdent_long_lines
509 0 90 $is_block_comment and $outdent_long_lines and $leading_space_count == $self->[19]
852 8180 99 30 $break_alignment_before and @{$rgroup_lines;}
861 8292 3 14 $is_terminal_ternary and @{$rgroup_lines;}
882 8297 3 9 $rfields->[0] eq "else " and @{$rgroup_lines;}
8300 0 9 $rfields->[0] eq "else " and @{$rgroup_lines;} and $is_balanced_line
905 1 4769 41 $rOpts_valign_signed_numbers && $rpatterns->[0] eq 'n,'
908 41 4373 397 not $is_numeric and @{$rgroup_lines;}
4414 13 384 not $is_numeric and @{$rgroup_lines;} and not get_recoverable_spaces($rgroup_lines->[0]{'indentation'})
928 4190 27 594 $is_block_comment and $outdent_long_lines
4217 0 594 $is_block_comment and $outdent_long_lines and not @{$rgroup_lines;}
1511 1268 8 7 $ci_prev != $ci_new and $imax_align >= 0
1276 7 0 $ci_prev != $ci_new and $imax_align >= 0 and $ci_new == 0 || $group_line_count > 1
1862 1945 2 70 $saw_signed_number and $rOpts_valign_signed_numbers
2112 178 21 45 $side_comment and $prev_comment
2118 0 171 28 $rOpts_valign_signed_numbers && ($pat eq 'n,' || $pat eq 'n,b')
2175 0 0 2 $col_now and $pad > 0
0 1 1 $col_now and $pad > 0 and $pad <= $padding_available
2248 4 0 17 $line_m->{'list_type'} and $line->{'list_type'}
2257 45 2 0 $pat_m ne $pat and length $pat_m eq length $pat
2267 15 6 0 not $patterns_match and $lenmax > 2 * $lenmin
2376 97 78 270 $jend == $jbeg and $jend_m == $jbeg_m
175 12 258 $jend == $jbeg and $jend_m == $jbeg_m and $ng == 1 || $istop_mm < 0
12 9 249 $jend == $jbeg and $jend_m == $jbeg_m and $ng == 1 || $istop_mm < 0 and $ng == $ng_max || $istop < 0
9 1 248 $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'}
10 236 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
2440 74 62 38 defined $ng_last and $ng_beg == $ng_last
136 0 38 defined $ng_last and $ng_beg == $ng_last and $i == $i_last
2533 70 22 0 defined $rmax_move->{$ng} and $move > $rmax_move->{$ng}
92 0 0 defined $rmax_move->{$ng} and $move > $rmax_move->{$ng} and not $is_good_alignment_token{$raw_tok}
2632 170 4 0 defined $blocking_level[$ng] && $lev > $blocking_level[$ng]
2650 139 6 29 $jmax == $jmax_m && $it_stop_m == $jmax_m - 2
2662 41 77 56 $top_level and $is_good_alignment_token{$raw_tok}
2669 3 60 55 defined $is_good_alignment_token{$raw_tok} and $lines_total > 2 || $group_list_type && $jmax < $jmax_m && $top_level
2695 55 90 0 ($lines_above == 1 || $lines_above == 2 && $lines_below >= 4) && $col_want > $col + $short_pad * $factor
2699 52 93 0 ($lines_below == 1 || $lines_below == 2 && $lines_above >= 4) && $col > $col_want + $short_pad * $factor
2781 0 0 539 defined $line_obj and defined $ridel
0 0 539 defined $line_obj and defined $ridel and @{$ridel;}
2853 536 2 1 defined $j_terminal_match and $jmin_del <= $j_terminal_match
3087 862 4563 629 not defined $i_eq and $raw_tok eq "="
3131 1182 304 39 $nr == 0 and $nl > 0
3152 1156 105 264 defined $i_eq_l and defined $i_eq_r
3158 0 5 259 $tok_eq_l eq $tok_eq_r and $i_eq_l == 0
5 0 259 $tok_eq_l eq $tok_eq_r and $i_eq_l == 0 and $i_eq_r == 0
5 258 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
3236 623 11 6 substr($tok, 0, 1) eq "{" and $tok =~ /^\{\d+if/
3260 687 951 130 $nlines > 2 && $imax > 1
3324 3777 37 42 $deleted_assignment_token and $lev > $group_level || !$is_if_or{$raw_tok}
3339 2554 1272 30 $jj == $jbeg and $has_terminal_match
3826 12 18 $jj == $jbeg and $has_terminal_match and $nlines == 2
3345 2982 46 828 $delete_me and $tok_count == 1
3353 215 75 15 defined $i_eq and $i < $i_eq
3361 657 35 136 $is_assignment{$raw_tok} and $lev == $group_level
3368 79 44 13 $imax > 0 and $i == $imax
3500 896 24 526 $list_type and $list_type eq $list_type_m
3774 584 448 90 $i > 0 and $lev < $last_lev
3806 246 299 146 $all_monotonic and $tok_end =~ /^,/
3808 97 49 93 $ii >= 0 and fat_comma_to_comma($rtokens->[$ii]) eq $tok_end
4030 108 67 77 $jl >= 0 and defined $match_tree[$depth]
175 0 77 $jl >= 0 and defined $match_tree[$depth] and @{$match_tree[$depth];}
67 6 71 $jl >= 0 and defined $match_tree[$depth] and @{$match_tree[$depth];} and defined $levels_current[$depth]
4053 70 55 0 $depth > 0 and $levels_next[$depth] <= $levels_next[$depth - 1]
4129 4 4 253 $def_current && $def_next
4135 23 0 23 $dep > 0 and defined $match_tree[$dep - 1]
4373 0 28 179 $raw_tok and $lev == $group_level
4382 202 4 1 $j == $jmax_1 - 2 && $raw_tok eq '=>' && $$rfield_lengths_0[$j + 1] <= 3
4392 60 0 88 $raw_tok eq "=" and $lev == $group_level
4402 55 1 151 $is_good_marginal_alignment{$raw_tok} and not $line_ending_fat_comma
4412 163 41 3 $pat_0 ne $pat_1 and length $pat_0 eq length $pat_1
4439 43 113 0 $is_marginal == 0 and $line_ending_fat_comma
4452 126 26 4 $is_marginal == 1 and $saw_good_alignment || $max_pad < 3
4489 124 11 1 ($raw_tokb eq '(' || $raw_tokb eq '{') && $jmax_1 == 2 && $sc_term0 ne $sc_term1
4544 0 0 0 $sc_term1 and $sc_term0
4568 0 0 5 $sc_term0 and $sc_term1
4574 5 1 15 $is_marginal and defined $jfirst_bad
6 15 0 $is_marginal and defined $jfirst_bad and $imax_align > $jfirst_bad - 1
4584 0 7 14 $imax_align < 0 and defined $j0_eq_pad
4586 14 0 0 $imax_next >= 0 || $imax_prev >= 0 || 0 and $j0_eq_pad >= -$j0_max_pad
14 0 0 $imax_next >= 0 || $imax_prev >= 0 || 0 and $j0_eq_pad >= -$j0_max_pad and $j0_eq_pad <= $j0_max_pad
4650 0 0 443 @{$rlines;} and @{$rgroups;}
4692 4 27 0 $ngroups > 1 and $spaces < 0
4774 105 5 18 $level < $last_sc_level and $is_closing_block_type{substr $rfields->[0], 0, 1}
4822 164 43 15 $self->[7] > 0 && $group_level == $self->[4]
4898 251 49 4 $PASS < $MAX_PASS and $is_hanging_side_comment
4922 213 14 73 $move >= 0 and $j_sc_beg == 0
227 68 5 $move >= 0 and $j_sc_beg == 0 and $continuing_sc_flow
4947 26 0 23 $col > $max_comment_column and $col < $column_limit
5045 30 0 0 not $signed and $unsigned
5083 20 7 18 $Nu > 0 and $Nu <= $rOpts_valign_signed_numbers_limit
5093 4 8 18 $Nu > 0 and $Nu <= $rOpts_valign_signed_numbers_limit
5224 4 6 0 $median_unsigned_length >= $median_signed_length and $bad_count > 1
10 0 0 $median_unsigned_length >= $median_signed_length and $bad_count > 1 and $immobile_count > 1
5273 0 12 22 $excess_space{$ix_min} > 0 and $ix_min != $ix_first
5274 0 17 17 $excess_space{$ix_max} > 0 and $ix_max != $ix_last
5391 0 104 20 $n_count and $n_count > 1
5397 31 73 0 $comma_count and $comma_count > 1
5404 0 0 104 $len_pat1 and $len_field
5430 18 0 38 $i_bracket >= 0 and $i_bracket < $i_opening
5436 56 0 0 $i_brace >= 0 and $i_brace < $i_opening
5440 0 0 56 $i_opening >= 0 and $i_opening < length($field) - 1
5466 0 26 8 $len_pat1 >= 2 and substr($pat1, -2, 2) eq "=b"
0 10 16 $len_pat1 >= 3 and substr($pat1, -3, 3) eq "=>b"
5615 2 0 0 $rcol_hash->{'signed_count'} and $rcol_hash->{'unsigned_count'}
5627 0 9 2 $jcol >= 0 and $column_info{$jcol}
5632 2 0 0 $col < $old_col and $rfields->[$jcol] =~ /^([+-]?)\d/
2 0 0 $col < $old_col and $rfields->[$jcol] =~ /^([+-]?)\d/ and $1 || $column_info{$jcol}{'signed_count'}
5664 149 581 55 defined $old_col and $old_col != $col
5668 10 0 1 $rcol_hash->{'signed_count'} and $rcol_hash->{'unsigned_count'}
5699 0 30 755 length $field > 0 && substr($rtokens->[$jcol], 0, 2) ne '=>'
5702 30 0 755 $field_ok and $pattern
5780 523 0 262 $field_ok &&= $is_signed_number || $is_unsigned_number
5803 34 0 0 $rcol_hash->{'signed_count'} and $rcol_hash->{'unsigned_count'}
5858 18 1 29 $rcol_hash->{'signed_count'} and $rcol_hash->{'unsigned_count'}
6106 37 96 14 defined $old_col and $old_col != $col
6130 50 43 54 length $token > 1 and substr($token, 0, 1) eq "="
93 4 50 length $token > 1 and substr($token, 0, 1) eq "=" and $is_digit_char{substr $token, 1, 1}
6138 0 0 50 $pos >= 0 and $pos <= 2
6317 5054 348 3241 $j == $maximum_field_index and !defined($rfields->[$j]) || $rfield_lengths->[$j] == 0
6336 5361 32 9 $rOpts_fixed_position_side_comment and $j == $maximum_field_index
6579 0 14 0 defined $open_or_close and $open_or_close == 1
6592 12 20 0 $gap >= 0 and $maximum_line_length != $cached_line_maximum_length || defined $level_end && $level > $level_end
6608 12 0 20 $gap >= 0 and defined $seqno_beg
6637 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
6691 16 13 4 $str =~ /^\);/ and $cached_line_text =~ /^[\)\}\]\s]*$/
6717 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
6725 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]
6735 0 0 3 length $ws == $diff and $ws =~ /^\s+$/
6934 152 11 0 $open_or_close == 3 and not $line =~ /\{\s*$/
158 5 0 $open_or_close == 4 and not $line =~ /\}\s*$/
7016 1 0 2 $valign_buffer_filling and $diff
7022 0 0 7 length $ws == $diff and $ws =~ /^\s+$/
7057 7948 396 2 $seqno_string and $valign_buffer_filling
7076 355 33 10 index($seqno_string, ":") != -1 and $seqno_string =~ /^\d+(\:+\d+)+$/
388 2 8 index($seqno_string, ":") != -1 and $seqno_string =~ /^\d+(\:+\d+)+$/ and not $args_to_D[0] =~ /^[\}\)\]\:\?]/
7168 0 0 0 $rOpts_tabs and $level
7226 8296 5 45 $require_tabs and $leading_space_count > 0

or 2 conditions

line l !l condition
782 0 3 $rvertical_tightness_flags->{'_vt_valid_flag'} ||= 1
3317 148 5 $delete_me ||= 1
3330 47 15 $delete_me ||= 1
4586 0 14 $imax_next >= 0 || $imax_prev >= 0 || 0

or 3 conditions

line l !l&&r !l&&!r condition
374 0 0 0 $error ||= @missing_keys
805 3036 0 5363 $level != $group_level or $group_maximum_line_length and $maximum_line_length != $group_maximum_line_length
0 164 5199 $level != $group_level or $group_maximum_line_length and $maximum_line_length != $group_maximum_line_length or $is_outdented
164 2 5197 $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 $rOpts_valign_block_comments
4576 9 13 $is_block_comment || $rOpts_valign_side_comments || $rOpts_valign_code
2 13 5184 $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 $rOpts_valign_block_comments or not $is_block_comment || $rOpts_valign_side_comments || $rOpts_valign_code
915 333 15 36 $rgroup_lines->[0]{'jmax'} > 1 or $self->[17] > 3
943 76 14 4127 @{$rgroup_lines;} or $is_numeric
14 1 4126 @{$rgroup_lines;} or $is_numeric or get_recoverable_spaces($indentation)
973 91 3150 348 $jmax == 0 or $$rtokens[$jmax - 1] ne "#"
1034 45 98 3425 $level_end < $level or $is_closing_token{substr $rfields->[0], 0, 1}
1285 0 0 0 $jmax <= 0 or $tokens[0] eq "#"
1511 0 0 7 $ci_new == 0 || $group_line_count > 1
2121 171 1 27 not $is_numeric or $side_comment
2154 0 1 2 $fixit ||= $match_code
2159 0 1 1 $fixit ||= $nlines <= 1
2235 0 0 21 $imax_min >= @{$rfield_lengths;} or $imax_min >= @{$rfield_lengths_m;}
2376 175 83 12 $ng == 1 || $istop_mm < 0
172 77 9 $ng == $ng_max || $istop < 0
72 7 169 $imax != $imax_m || $istop_m != $imax_m
2394 4 17 5 $rtokens->[0] =~ /^=\d/ or $list_type
2520 0 12 127 not defined $ngb or $nge <= $ngb
2669 63 43 9 $lines_total > 2 || $group_list_type && $jmax < $jmax_m && $top_level
2695 0 0 145 $is_big_gap ||= ($lines_above == 1 || $lines_above == 2 && $lines_below >= 4) && $col_want > $col + $short_pad * $factor
2699 0 0 145 $is_big_gap ||= ($lines_below == 1 || $lines_below == 2 && $lines_above >= 4) && $col > $col_want + $short_pad * $factor
2711 5 7 162 $col_want > $col_max or $col > $col_limit
12 0 162 $col_want > $col_max or $col > $col_limit or $is_big_gap
7 0 162 $col_want > $col_max or $col > $col_limit or $is_big_gap or $is_blocked
2870 19 25 32 not $old_list_type or $old_list_type ne $new_list_type
3077 0 68 1923 $saw_side_comment ||= $length
3158 12 1 246 substr($pat_eq_l, 0, 1) ne substr($pat_eq_r, 0, 1) || $ci_jump
3236 17 38 602 substr($tok, 0, 1) eq "?" or substr($tok, 0, 1) eq "{" and $tok =~ /^\{\d+if/
3260 430 130 1638 $saw_large_group ||= $nlines > 2 && $imax > 1
3273 2092 928 836 defined $il || defined $ir
3282 1 16 16 $delete_me ||= !$align_ok
3293 15 93 24 $saw_dividing_token ||= $tok eq $dividing_token
3301 3 0 7 $nlines < 5 || !$saw_dividing_token
21 3 7 $delete_me ||= $nlines < 5 || !$saw_dividing_token
3324 24 38 17 $lev > $group_level || !$is_if_or{$raw_tok}
3379 766 0 3090 $delete_me ||= !$align_ok
3388 613 0 153 not defined $delete_above_level or $lev < $delete_above_level
3477 52 20 880 index($field, "-") != -1 or index($field, "+") != -1
4053 127 0 125 not defined $levels_next[$depth] or $depth > 0 and $levels_next[$depth] <= $levels_next[$depth - 1]
4128 257 4 152 $def_current or $def_next
4129 8 38 215 not $def_current && $def_next or $token_patterns_current[$dep] ne $token_patterns_next[$dep]
4167 37 3 15 not defined $np_now or $np != $np_now
4333 7 119 164 defined $line_1->{'j_terminal_match'} or $line_0->{'list_type'}
119 8 156 defined $line_1->{'j_terminal_match'} or $line_0->{'list_type'} or $line_1->{'is_hanging_side_comment'}
4375 4 18 157 $saw_if_or ||= $is_if_or{$raw_tok}
4452 20 4 6 $saw_good_alignment || $max_pad < 3
4462 0 0 156 $jmax_0 < 1 or $jmax_1 < 1
4473 19 100 37 $is_marginal or $sc_term0
4489 20 1 135 $is_marginal ||= ($raw_tokb eq '(' || $raw_tokb eq '{') && $jmax_1 == 2 && $sc_term0 ne $sc_term1
4538 0 0 0 $pat0 ne $pat1 || $line_ending_fat_comma
4626 0 0 0 $rpatterns_0->[0] =~ /,/ or $rpatterns_1->[0] =~ /,/
4695 13 0 18 $ng == 0 or $spaces < $extra_leading_spaces
4765 75 7 128 $line_diff > $short_diff or not $rOpts_valign_side_comments
4791 0 0 4 $cached_line_type == 2 or $cached_line_type == 4
5479 0 0 80 $pos_start_number <= 0 or $pos_start_number >= $len_field
5632 0 0 0 $1 || $column_info{$jcol}{'signed_count'}
5733 124 0 0 $field_ok ||= $pos_start_number
5780 47 215 0 $is_signed_number || $is_unsigned_number
5796 23 11 167 not $field_ok or $rcol_hash->{'pos_start_number'} ne $pos_start_number
34 0 167 not $field_ok or $rcol_hash->{'pos_start_number'} ne $pos_start_number or $rcol_hash->{'char_end_part1'} ne $char_end_part1
11 0 167 not $field_ok or $rcol_hash->{'pos_start_number'} ne $pos_start_number or $rcol_hash->{'char_end_part1'} ne $char_end_part1 or $rcol_hash->{'col'} ne $col
6157 0 0 38 not $len_equals_symbol or $rcol_hash->{'col'} ne $col
6317 0 3241 348 !defined($rfields->[$j]) || $rfield_lengths->[$j] == 0
6560 21 11 37 $cached_line_type == 1 or $cached_line_type == 3
6592 0 0 20 $maximum_line_length != $cached_line_maximum_length || defined $level_end && $level > $level_end
6637 0 27 1 $open_or_close == $cached_line_type || $cached_line_type == 2 && $open_or_close == 4 || !$open_or_close && $cached_line_type == 2
6934 0 0 163 $open_or_close == 3 and not $line =~ /\{\s*$/ or $open_or_close == 4 and not $line =~ /\}\s*$/
6944 8236 0 163 not $open_or_close or $side_comment_length > 0
8236 0 163 not $open_or_close or $side_comment_length > 0 or $is_outdented_line
0 0 163 not $open_or_close or $side_comment_length > 0 or $is_outdented_line or not $line_length

xor 4 conditions

line l&&r l&&!r !l&&r !l&&!r condition
5209 10 6 1 2 $excess_m xor $excess