]> git.donarmstrong.com Git - perltidy.git/commitdiff
fix issue b1426
authorSteve Hancock <perltidy@users.sourceforge.net>
Fri, 18 Nov 2022 16:16:06 +0000 (08:16 -0800)
committerSteve Hancock <perltidy@users.sourceforge.net>
Fri, 18 Nov 2022 16:16:06 +0000 (08:16 -0800)
dev-bin/run_convergence_tests.pl.data
lib/Perl/Tidy/Formatter.pm

index b2c276250021553661651f99884892dfb214a1c9..6555c12e9889e0c3f5def2e3dbe70435a63e29e0 100644 (file)
@@ -10971,6 +10971,23 @@ my$sem=sub
 --variable-maximum-line-length
 --weld-nested-containers
 
+==> b1426.in <==
+        return$self->_mutate($label,$newseq,
+                             $length);
+
+        return
+          $self->_mutate($label,$newseq,$length,);
+
+==> b1426.par <==
+--add-trailing-commas
+--noadd-whitespace
+--delete-trailing-commas
+--ignore-old-breakpoints
+--line-up-parentheses
+--maximum-line-length=44
+--variable-maximum-line-length
+--want-trailing-commas='m'
+
 ==> b146.in <==
 # State 1
 
index 1aa738ba448cecd7b763c78efe29767594701f58..c82704b6e0e21d9475f37ea5bc448cae08d11de7 100644 (file)
@@ -1602,21 +1602,21 @@ EOM
     }
 
     #-----------------------------------------------------------
-    # The combination -lp -vmll -atc -dtc -wtc=b can be unstable
+    # The combination -lp -vmll -atc -dtc can be unstable
     #-----------------------------------------------------------
-    # This fixes b1386 b1387 b1388
+    # This fixes b1386 b1387 b1388 which had -wtc='b'
+    # Updated to to include any -wtc to fix b1426
     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->{'want-trailing-commas'} )
     {
         $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.
+## Issuing a warning message causes trouble with test cases, and this combo is
+## so rare that it is unlikely to not occur in practice. So skip warning.
 ##        Warn(
-##"The combination -vmll -lp -atc -dtc -wtc=b can be unstable; turning off -dtc\n"
+##"The combination -vmll -lp -atc -dtc can be unstable; turning off -dtc\n"
 ##        );
     }