]> git.donarmstrong.com Git - perltidy.git/commitdiff
fix instability b1395
authorSteve Hancock <perltidy@users.sourceforge.net>
Fri, 21 Oct 2022 00:53:25 +0000 (17:53 -0700)
committerSteve Hancock <perltidy@users.sourceforge.net>
Fri, 21 Oct 2022 00:53:25 +0000 (17:53 -0700)
dev-bin/run_convergence_tests.pl.data
lib/Perl/Tidy/Formatter.pm

index 6602117c46639fd283d4a97c51779813ee87cce7..01e089419cc47ea609aa524f3a1e79cdd440ab88 100644 (file)
@@ -10454,6 +10454,30 @@ SOAP::Transport::HTTP::Daemon->new (LocalAddr => $host,
 --extended-line-up-parentheses
 --want-trailing-commas='h'
 
+==> b1395.in <==
+                  # The old = break is under stress and must be ignored
+                  if(my ($safari_build, $safari_minor) =
+                        split /\./, $1)
+                  {
+                        ...;
+                  }
+
+                  if(
+                        my ($safari_build, $safari_minor)
+                        = split /\./, $1
+                       )
+                  {
+                        ...;
+                  }
+
+
+==> b1395.par <==
+--continuation-indentation=5
+--indent-columns=6
+--maximum-line-length=57
+--nospace-after-keyword='if'
+--paren-tightness=2
+
 ==> b140.in <==
 $cmd[ $i ]=[
         $s, $e, $cmd, \@hunk, $i ] ;
index 3fd0f2a4a098ac54dba18a191ee7e1437a9bc8c2..12e000b195edf9b89f47f77b09190d50ded54521 100644 (file)
@@ -20206,11 +20206,17 @@ EOM
             $last_old_breakpoint_count = $old_breakpoint_count;
 
             # Check for a good old breakpoint ..
-            # Note: ignore old breaks at types 'L' and 'R' to fix case
-            # b1097. These breaks only occur under high stress.
-            if (   $old_breakpoint_to_go[$i]
+            if (
+                $old_breakpoint_to_go[$i]
+
+                # Note: ignore old breaks at types 'L' and 'R' to fix case
+                # b1097. These breaks only occur under high stress.
                 && $type ne 'L'
-                && $next_nonblank_type ne 'R' )
+                && $next_nonblank_type ne 'R'
+
+                # ... and ignore other high stress level breaks, fixes b1395
+                && $levels_to_go[$i] < $list_stress_level
+              )
             {
                 ( $want_previous_breakpoint, $i_old_assignment_break ) =
                   $self->check_old_breakpoints( $i_next_nonblank,