From: Steve Hancock <perltidy@users.sourceforge.net> Date: Tue, 12 Jan 2021 23:50:21 +0000 (-0800) Subject: fix unusual blinker related to large -ci and -mft=n X-Git-Tag: 20210402~91 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=9a97dba0e59f6e186b7f898abcc710c417c4b5c4;p=perltidy.git fix unusual blinker related to large -ci and -mft=n --- diff --git a/lib/Perl/Tidy/Formatter.pm b/lib/Perl/Tidy/Formatter.pm index 6bc33412..ddf2d818 100644 --- a/lib/Perl/Tidy/Formatter.pm +++ b/lib/Perl/Tidy/Formatter.pm @@ -10651,6 +10651,8 @@ EOM || ( $comma_count_in_batch && ( $rOpts_maximum_fields_per_table > 0 + && $rOpts_maximum_fields_per_table <= + $comma_count_in_batch || $rOpts_comma_arrow_breakpoints == 0 ) ) diff --git a/local-docs/BugLog.pod b/local-docs/BugLog.pod index 0fe5c94d..29de28bc 100644 --- a/local-docs/BugLog.pod +++ b/local-docs/BugLog.pod @@ -2,6 +2,27 @@ =over 4 +=item B<Fixed unusual blinker> + +The following blinker was found in random testing. The following statement +(with @j starting at level 0) + + @j = ( $x, $y, $z ); + +run with the following profile + + --indent-columns=5 + --continuation-indentation=7 + --maximum-line-length=20 + --break-before-paren-and-indent=2 + --break-before-paren=2 + --maximum-fields-per-table=4 + +caused an oscillation between two states. An unusual feature which contributed +to the problem is the very large ci value. This is fixed in a patch made 12 Jan +2021. + + =item B<Improve indentation of multiline qw quotes when -xci flag is set> The indentation of multiline qw quotes runs into problems when there is nesting, diff --git a/t/snippets/README.md b/t/snippets/README.md index 6780210e..28fd1cd7 100644 --- a/t/snippets/README.md +++ b/t/snippets/README.md @@ -203,3 +203,9 @@ To update the list of covered parameters, run ``` make_coverage_report.pl ``` + +This shows which parameters are included in test cases. Most are covered, +and when new parameters are added there should also be corresponding test +cases added. But a problem is that perltidy has so many parameters that it is +not possible to write enough tests to test all combinations. This problem +is addressed with the random testing scripts in the ```git/dev-bin``` directory.