]> git.donarmstrong.com Git - perltidy.git/commitdiff
revise fix for b1455
authorSteve Hancock <perltidy@users.sourceforge.net>
Fri, 27 Sep 2024 13:30:19 +0000 (06:30 -0700)
committerSteve Hancock <perltidy@users.sourceforge.net>
Fri, 27 Sep 2024 13:30:19 +0000 (06:30 -0700)
dev-bin/run_convergence_tests.pl.expect
lib/Perl/Tidy/Formatter.pm
lib/Perl/Tidy/VerticalAligner.pm

index 1986d7a7837037cc76f243cacea3c3fb074b2d4f..e305c91ddbfd541f8960e50aad783e63164b5486 100644 (file)
@@ -7043,8 +7043,8 @@ if (  ioctl (  STDERR, $TIOCGWINSZ,
           ...;
 }
 
-if (  ioctl (  STDERR, $TIOCGWINSZ,
-               $winsize )
+if (  ioctl (  STDERR, $TIOCGWINSZ, $winsize
+      )
   )
 {
           ...;
@@ -7103,24 +7103,28 @@ SOAP::Transport::HTTP::Daemon->new (LocalAddr => $host,
 
 ==> b1396 <==
      print 'not '
-       unless ( near ( great_circle_distance ( 0, 0, 0, pi / 2 ),
-            pi / 2 ) );
+       unless ( near (
+            great_circle_distance ( 0, 0, 0, pi / 2 ), pi / 2
+       ) );
 
      print 'not '
-       unless ( near ( great_circle_distance ( 0, 0, 0, pi / 2 ),
-            pi / 2 ) );
+       unless ( near (
+            great_circle_distance ( 0, 0, 0, pi / 2 ), pi / 2
+       ) );
 
 
 ==> b1397 <==
          (
-                  my $msg = sprintf ( gettext("%s: fatal error at line %d:\n"),
-                           $progname, $line )
+                  my $msg = sprintf (
+                           gettext("%s: fatal error at line %d:\n"), $progname, $line
+                      )
                       . "@_\n"
          ) =~ tr/\0//d;
 
          (
-                  my $msg = sprintf ( gettext("%s: fatal error at line %d:\n"),
-                           $progname, $line )
+                  my $msg = sprintf (
+                           gettext("%s: fatal error at line %d:\n"), $progname, $line
+                      )
                       . "@_\n"
          ) =~ tr/\0//d;
 
index 724ec313ed56c0bc861920498fbe4771f77eeb5c..9dc5a79df77a3782250dcc71ade1c93897264ed7 100644 (file)
@@ -18003,8 +18003,8 @@ sub initialize_warn_mismatched {
     #  y - want scalar but no return seen
     #  s - want scalar but only arrays with count > 1 returned
     $rwarn_mismatched_return_types =
-      initialize_warn_hash( 'warn-mismatched-return-types',
-        1, [qw(x o u y s)] );
+      initialize_warn_hash( 'warn-mismatched-return-types', 1,
+        [qw(x o u y s)] );
     $ris_warn_mismatched_return_excluded_name =
       make_excluded_name_hash('warn-mismatched-return-exclusion-list');
     return;
@@ -19356,10 +19356,7 @@ EOM
             $weld_count_this_start = 0;
             $weld_starts_in_block  = 0;
 
-            (
-                my $new_weld_ok,
-                $maximum_text_length, $starting_lentot, my $msg
-              )
+            ( my $new_weld_ok, $maximum_text_length, $starting_lentot, my $msg )
               = $self->setup_new_weld_measurements( $Kouter_opening,
                 $Kinner_opening );
 
@@ -31947,7 +31944,15 @@ EOM
 
         # Increase tol when -atc and -dtc are both used to allow for
         # possible loss in length on next pass due to a comma. Fixes b1455.
-        if ( $rOpts_delete_trailing_commas && $rOpts_add_trailing_commas ) {
+        if (
+               $rOpts_delete_trailing_commas
+            && $rOpts_add_trailing_commas
+
+            # optional additional restriction which works for b1455:
+            && $rOpts_extended_continuation_indentation
+            && $rOpts_continuation_indentation > $rOpts_indent_columns
+          )
+        {
             $tol += 1;
         }
 
index e58aa346eaf71128cf4644beb8b9365b2e1ee8f8..c4890852cf891e96dd8b38a5ec3c70e63639c605 100644 (file)
@@ -2904,10 +2904,7 @@ EOM
         #----------------------------------------------------
         # Create a hash of alignment token info for each line
         #----------------------------------------------------
-        (
-            my $rline_hashes,  my $requals_info,
-            $saw_side_comment, $max_lev_diff
-          )
+        ( my $rline_hashes, my $requals_info, $saw_side_comment, $max_lev_diff )
           = make_alignment_info( $group_level, $rnew_lines, $saw_side_comment );
 
         #------------------------------------------------------------