--maximum-line-length=49
--square-bracket-vertical-tightness-closing=1
+==> b1194.in <==
+# S1
+ is(0+keys%mani,0+@files,"no duplicate files in MANIFEST")
+ or diag(
+ join("\n ","Duplicates:",grep$mani{$_}>1,
+ keys%mani)
+ );
+# S2
+ is(0+keys%mani,0+@files,"no duplicate files in MANIFEST")
+ or
+ diag(join("\n ","Duplicates:",grep$mani{$_}>1,keys%mani));
+
+
+==> b1194.par <==
+--noadd-whitespace
+--continuation-indentation=0
+--ignore-old-breakpoints
+--indent-columns=10
+--line-up-parentheses
+--maximum-line-length=70
+--paren-vertical-tightness=2
+--weld-nested-containers
+
==> b120.in <==
# Same as bug96
# State 1
while ( defined($Ktest) ) {
my $type = $rLL->[$Ktest]->[_TYPE_];
+ # if next container token is opening, we want its parent container
+ if ( $is_opening_type{$type} ) {
+ my $type_sequence = $rLL->[$Ktest]->[_TYPE_SEQUENCE_];
+ $parent_seqno = $self->[_rparent_of_seqno_]->{$type_sequence};
+ last;
+ }
+
# if next container token is closing, it is the parent seqno
- if ( $is_closing_type{$type} ) {
+ elsif ( $is_closing_type{$type} ) {
my $type_sequence = $rLL->[$Ktest]->[_TYPE_SEQUENCE_];
if ( $Ktest > $KK ) {
$parent_seqno = $type_sequence;
last;
}
- # if next container token is opening, we want its parent container
- elsif ( $is_opening_type{$type} ) {
- my $type_sequence = $rLL->[$Ktest]->[_TYPE_SEQUENCE_];
- $parent_seqno = $self->[_rparent_of_seqno_]->{$type_sequence};
- last;
- }
-
# not a container - must be ternary - keep going
$Ktest = $rLL->[$Ktest]->[_KNEXT_SEQ_ITEM_];
}
else {
$is_one_line_weld = 1;
}
-
- # If an apparent one-line weld might have been created by
- # -vt and -lp, then do not mark as a one-line weld.
- # This condition added to fix b1183.
- # Added block type test to fix b1191
- if ( $is_one_line_weld
- && $rOpts_line_up_parentheses
- && $opening_vertical_tightness{$token_oo}
- && !$rblock_type_of_seqno->{$inner_seqno}
- && !$ris_excluded_lp_container->{$outer_seqno} )
- {
- $is_one_line_weld = 0;
- }
}
}
if ($rOpts_freeze_whitespace);
my $rwant_container_open = $self->[_rwant_container_open_];
+ my $rK_weld_left = $self->[_rK_weld_left_];
# Uses these global parameters:
# $rOpts_block_brace_tightness
# requested
my $ovt = $opening_vertical_tightness{$token_end};
my $iend_next = $ri_last->[ $n + 1 ];
+
+ # Turn off the -vt flag if the next line ends in a weld.
+ # This avoids an instability with one-line welds (fixes b1183).
+ my $type_end_next = $types_to_go[$iend_next];
+ $ovt = 0
+ if ( $rK_weld_left->{ $K_to_go[$iend_next] }
+ && $is_closing_type{$type_end_next} );
+
unless (
$ovt < 2
&& ( $nesting_depth_to_go[ $iend_next + 1 ] !=
=over 4
+=item B<Fix formatting instability issue b1194>
+
+Testing with random parameters produced a case of unstable formatting
+which is fixed with this update.
+
+This fixes case b1194, and at the same time it simplifies the logic
+which handles issues b1183 and b1191.
+
+21 Aug 2021.
+
=item B<Fix some problems involving tabs characters, case c062>
This update fixes some problems found in random testing with tab characters.