From: Steve Hancock Date: Fri, 18 Nov 2022 16:16:06 +0000 (-0800) Subject: fix issue b1426 X-Git-Tag: 20221112.01~15 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=9c7e7f5f819e81291c4aa96249d3c4b54c346037;p=perltidy.git fix issue b1426 --- diff --git a/dev-bin/run_convergence_tests.pl.data b/dev-bin/run_convergence_tests.pl.data index b2c27625..6555c12e 100644 --- a/dev-bin/run_convergence_tests.pl.data +++ b/dev-bin/run_convergence_tests.pl.data @@ -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 diff --git a/lib/Perl/Tidy/Formatter.pm b/lib/Perl/Tidy/Formatter.pm index 1aa738ba..c82704b6 100644 --- a/lib/Perl/Tidy/Formatter.pm +++ b/lib/Perl/Tidy/Formatter.pm @@ -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" ## ); }