From: Steve Hancock Date: Tue, 4 Jan 2022 01:14:49 +0000 (-0800) Subject: fix issue b1284, adjust a weld tolerance X-Git-Tag: 20211029.05~2 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=16d45a3d1b8d75abaea27132ee545a69a7aa2a45;p=perltidy.git fix issue b1284, adjust a weld tolerance --- diff --git a/dev-bin/run_convergence_tests.pl.data b/dev-bin/run_convergence_tests.pl.data index 0c86385a..c3439cef 100644 --- a/dev-bin/run_convergence_tests.pl.data +++ b/dev-bin/run_convergence_tests.pl.data @@ -8697,6 +8697,26 @@ use overload ==> b1280.par <== --brace-left-and-indent +==> b1284.in <== +# S1 + if ( ($before) + && ( !( $before=~ + /$begin_env_rx|$begin_cmd_rx/ ) ) ); +# S2 + if ( ($before) + && ( !($before=~/$begin_env_rx|$begin_cmd_rx/ ) ) + ); + + +==> b1284.par <== +--indent-columns=7 +--maximum-line-length=77 +--nowant-left-space='/= &&= .= = -= + += ^= += //= % >>= % |= >= ||= =~' +--nowant-right-space='>= / / - &= ||= ||= /= + =~ >>= == = ||= >= -= |=' +--paren-vertical-tightness-closing=2 +--paren-vertical-tightness=2 +--weld-nested-containers + ==> b1289.in <== my $sim4 = new Bio::Tools::Sim4::Results ( diff --git a/lib/Perl/Tidy/Formatter.pm b/lib/Perl/Tidy/Formatter.pm index 1341dc50..9e157e5b 100644 --- a/lib/Perl/Tidy/Formatter.pm +++ b/lib/Perl/Tidy/Formatter.pm @@ -8777,7 +8777,8 @@ EOM $self->excess_line_length_for_Krange( $Kstart, $Kstop ); # Coding simplified here for case b1219. - $is_one_line_weld = $excess <= 0; + # Increased tol to 1 to fix b1284. + $is_one_line_weld = $excess <= 1; ##0; } # DO-NOT-WELD RULE 1: