--want-trailing-commas='b'
--variable-maximum-line-length
+==> b1386.in <==
+# S1
+open( OUT,
+ ">"
+ . Bio::Root::IO->catfile(
+ "t", "out.pfam"
+ ),
+);
+
+# S2
+open( OUT,
+ ">"
+ . Bio::Root::IO->catfile( "t",
+ "out.pfam", ),
+);
+
+==> b1386.par <==
+--add-trailing-commas
+--continuation-indentation=8
+--delete-trailing-commas
+--extended-line-up-parentheses
+--ignore-old-breakpoints
+--indent-columns=3
+--maximum-line-length=52
+--variable-maximum-line-length
+--want-trailing-commas='b'
+
+==> b1387.in <==
+unlink(
+ Bio::Root::IO->catfile(
+ "t", "gcg.out"
+ )
+);
+
+unlink(
+ Bio::Root::IO->catfile(
+ "t", "gcg.out", )
+);
+
+==> b1387.par <==
+--add-trailing-commas
+--delete-trailing-commas
+--extended-line-up-parentheses
+--ignore-old-breakpoints
+--maximum-line-length=26
+--variable-maximum-line-length
+--want-trailing-commas='b'
+
==> b140.in <==
$cmd[ $i ]=[
$s, $e, $cmd, \@hunk, $i ] ;
##Warn("Increased -ci=n to n=2 for stability with -lp and -vmll\n");
}
+ #-----------------------------------------------------------
+ # The combination -lp -vmll -atc -dtc -wtc=b can be unstable
+ #-----------------------------------------------------------
+ # This fixes b1386 b1387 b1388
+ if ( $rOpts->{'variable-maximum-line-length'}
+ && $rOpts->{'line-up-parentheses'}
+ && $rOpts->{'add-trailing-commas'}
+ && $rOpts->{'delete-trailing-commas'}
+ && $rOpts->{'want-trailing-commas'}
+ && $rOpts->{'want-trailing-commas'} =~ /b/ )
+ {
+ $rOpts->{'delete-trailing-commas'} = 0;
+## warning causes trouble with test cases and this combo is so rare that
+## it is unlikely to not occur in practice.
+## Warn(
+##"The combination -vmll -lp -atc -dtc -wtc=b can be unstable; turning off -dtc\n"
+## );
+ }
+
%container_indentation_options = ();
foreach my $pair (
[ 'break-before-hash-brace-and-indent', '{' ],
# then the issue of what to do about the other variables, such
# as token counts and the '$last...' vars needs to be considered.
- return if ( @{$rLL_new} < 3 ); # for safety, shouldn't happen
+ # Safety check, shouldn't happen
+ if ( @{$rLL_new} < 3 ) {
+ DEVEL_MODE && Fault("not enough tokens on stack to remove '$type'\n");
+ return;
+ }
my ( $rcomma, $rblank );
# case 3: error, shouldn't happen unless bad call
else {
+ DEVEL_MODE && Fault("Could not find token type '$type' to remove\n");
return;
}
# Unrecognized parameter, ignore. Should have been caught in input check
else {
+ DEVEL_MODE && Fault("Unrecognized parameter '$trailing_comma_style'\n");
+
# treat unknown parameter as stable
return !$if_add;
}
# or is at root level
# or there is some kind of error (i.e. unbalanced file)
# returns false otherwise
- return 1 if ( $i < 0 ); # shouldn't happen, bad call
+
+ if ( $i < 0 ) {
+ DEVEL_MODE && Fault("Bad call, i='$i'\n");
+ return 1;
+ }
+
my $seqno = $parent_seqno_to_go[$i];
return 1 if ( !$seqno || $seqno eq SEQ_ROOT );
return 1 if ( $self->[_rblock_type_of_seqno_]->{$seqno} );