]> git.donarmstrong.com Git - perltidy.git/commitdiff
update VERSION to 20201202 20201202
authorSteve Hancock <perltidy@users.sourceforge.net>
Wed, 2 Dec 2020 18:00:33 +0000 (10:00 -0800)
committerSteve Hancock <perltidy@users.sourceforge.net>
Wed, 2 Dec 2020 18:00:33 +0000 (10:00 -0800)
30 files changed:
CHANGES.md
MANIFEST
bin/perltidy
docs/BugLog.html
docs/ChangeLog.html
docs/Tidy.html
docs/perltidy.html
lib/Perl/Tidy.pm
lib/Perl/Tidy.pod
lib/Perl/Tidy/Debugger.pm
lib/Perl/Tidy/DevNull.pm
lib/Perl/Tidy/Diagnostics.pm
lib/Perl/Tidy/FileWriter.pm
lib/Perl/Tidy/Formatter.pm
lib/Perl/Tidy/HtmlWriter.pm
lib/Perl/Tidy/IOScalar.pm
lib/Perl/Tidy/IOScalarArray.pm
lib/Perl/Tidy/IndentationItem.pm
lib/Perl/Tidy/LineBuffer.pm
lib/Perl/Tidy/LineSink.pm
lib/Perl/Tidy/LineSource.pm
lib/Perl/Tidy/Logger.pm
lib/Perl/Tidy/Tokenizer.pm
lib/Perl/Tidy/VerticalAligner.pm
lib/Perl/Tidy/VerticalAligner/Alignment.pm
lib/Perl/Tidy/VerticalAligner/Line.pm
local-docs/BugLog.pod
t/snippets/perltidy_common_flags.pl [new file with mode: 0755]
t/snippets/perltidy_random_run.pl
t/snippets/perltidy_random_setup.pl

index ade00efb33f1531f0bbbc8f97beff58761d1c537..26f382a679fe82c449df040fcde1e1d47b41497f 100644 (file)
@@ -1,16 +1,20 @@
 # Perltidy Change Log
 
-## 2020 10 01.03
+## 2020 12 02
+
+    - This release is being made primarily to make available a several new formatting 
+      parameters, in particular -xci, -kbb=s, -kba=s, and -wnxl=s. No significant 
+      bugs have been found since the previous release, but numerous minor issues have 
+      been found and fixed as listed below.
+
+    - This version is about 20% faster than the previous version due to optimizations
+      made with the help of Devel::NYTProf.
 
     - Added flag -wnxl=s, --weld-nested-exclusion-list=s, to provide control which containers
       are welded with the --weld-nested-containers parameter.  This is related to issue git #45.
 
     - Merged pull request git #46 which fixes the docs regarding the -fse flag.
 
-    - This release is being made to make available a number of new formatting 
-      parameters. No significant bugs have been found since the previous release, 
-      but several minor issues have been found and fixed as listed below.
-
     - Fixed issue git #45, -vtc=n flag was ignored when -wn was set.
 
     - implement request RT #133649, delete-old-newlines selectively. Two parameters, 
@@ -61,9 +65,6 @@
 
     - Added 'state' as a keyword.
 
-    - This version is about 20% faster than the previous version due to optimizations
-      made with the help of Devel::NYTProf.
-
     - A better test for convergence has been added. When iterations are requested,
       the new test will stop after the first pass if no changes in line break
       locations are made.  Previously, file checksums were used and required at least two 
index c0347468b84adec688f3b67cbc210fde22ccef65..52ef8683ea76d7d87dd725170091497e491eb66d 100644 (file)
--- a/MANIFEST
+++ b/MANIFEST
@@ -72,6 +72,7 @@ t/snippets2.t
 t/snippets20.t
 t/snippets21.t
 t/snippets22.t
+t/snippets23.t
 t/snippets3.t
 t/snippets4.t
 t/snippets5.t
index 0822f664e8de7473fb135aa9272c11cace540132..ad75b5b3ca253c244088bd8d9d3ccdb262282c17 100755 (executable)
@@ -4560,7 +4560,7 @@ The perltidy binary uses the Perl::Tidy module and is installed when that module
 
 =head1 VERSION
 
-This man page documents perltidy version 20201001.03
+This man page documents perltidy version 20201202
 
 =head1 BUG REPORTS
 
index 507b17cfab916b064a8d06f9b7e4f35643695fff..401ad56cbb01ff42fe41bead717b3c4744f7baa9 100644 (file)
 
 <dl>
 
+<dt id="removed-excess-spaces-in-a-package-declaration"><b>removed excess spaces in a package declaration</b></dt>
+<dd>
+
+<p>Testing revealed that for a line such as</p>
+
+<pre><code>   package        Bob::Dog;</code></pre>
+
+<p>which has extra spaces or even tabs after the keyword &#39;package&#39;, the extra spaces or tabs were not being removed. This was fixed 28 Nov 2020, 008443d. The line now formats to</p>
+
+<pre><code>    package Bob::Dog;</code></pre>
+
+</dd>
+<dt id="do-not-automatically-delete-closing-side-comments-with---indent-only"><b>do not automatically delete closing side comments with --indent-only</b></dt>
+<dd>
+
+<p>For the parameter combination --indent-only and --closing-side-comments, old closing side comments were getting deleted but new closing side comments were not made. A fix was made to prevent this deletion. This fix was made 27 Nov 2020, 957e0ca.</p>
+
+</dd>
 <dt id="fix-to-stop-at-1-iteration-when-using---indent-only"><b>fix to stop at 1 iteration when using --indent-only</b></dt>
 <dd>
 
-<p>Previously, for the combination --indent-only and -conv, two iterations would be done. Only one iteration is necessary in this case.</p>
+<p>Previously, for the combination --indent-only and -conv, two iterations would be done. Only one iteration is necessary in this case. Fix made 23 Nov 2020, ae493d8.</p>
 
 </dd>
 <dt id="fix-for-formatting-signed-numbers-with-spaces"><b>fix for formatting signed numbers with spaces</b></dt>
@@ -42,7 +60,7 @@
 
 <pre><code>    @london = ( deg2rad(-0.5), deg2rad( 90 - 51.3 ) );</code></pre>
 
-<p>Notice that the space within the parens around the &#39;-0.5&#39; is gone. An update was made to fix this, so that the final state is reached in one step. This fix was made 23 Nov 2020.</p>
+<p>Notice that the space within the parens around the &#39;-0.5&#39; is gone. An update was made to fix this, so that the final state is reached in one step. This fix was made 23 Nov 2020, f477c8b.</p>
 
 </dd>
 <dt id="fix-to-prevent-conversion-of-a-block-comment-to-hanging-side-comment"><b>fix to prevent conversion of a block comment to hanging side comment</b></dt>
 
 <p>For the following specific contitions the block comment in line 2 could be converted into a hanging side comment, which is undesirable:</p>
 
-<pre><code>   1. It contains nothing except for a &#39;#&#39;
+<pre><code>   1. The line contains nothing except for a &#39;#&#39; with no leading space
    2. It follows a line with side comment
    3. It has indentation level &gt; 0</code></pre>
 
-<p>An update was made to prevent this from happening. There are two cases, depending on the value of --maximum-consecutive-blank-lines, or -mbl. If this value is positive (the default) then a blank line is inserted above the block comment to prevent it from becoming a hanging side comment. If this -mbl is zero, then the comment is converted to be a static block comment which again prevents it from becoming a hanging side comment. This fix was made 23 Nov 2020.</p>
+<p>An update was made to prevent this from happening. There are two cases, depending on the value of --maximum-consecutive-blank-lines, or -mbl. If this value is positive (the default) then a blank line is inserted above the block comment to prevent it from becoming a hanging side comment. If this -mbl is zero, then the comment is converted to be a static block comment which again prevents it from becoming a hanging side comment. This fix was made 23 Nov 2020, 2eb3de1.</p>
 
 </dd>
 <dt id="improved-convergence-test"><b>improved convergence test</b></dt>
     elsif ( !$m0 &amp;&amp; $m1 )               { $CONFIG[1] = 1; }
     else                                { $ok        = 0; last; }</code></pre>
 
-<p>This update was made 15 Nov 2020.</p>
+<p>This update was made 15 Nov 2020, 2b7784d.</p>
 
 </dd>
 <dt id="added-option--wnxl-s-to-give-control-of-welding-by-the--wn-parameter"><b>added option -wnxl=s to give control of welding by the -wn parameter</b></dt>
index 1148de754be589f6e601e91d5c29ad6953fbba5a..f59053974d7e6af6792f896650a5df4f96edf325 100644 (file)
@@ -1,16 +1,20 @@
 <h1>Perltidy Change Log</h1>
 
-<h2>2020 10 01.03</h2>
+<h2>2020 12 02</h2>
 
-<pre><code>- Added flag -wnxl=s, --weld-nested-exclusion-list=s, to provide control which containers
+<pre><code>- This release is being made primarily to make available a several new formatting 
+  parameters, in particular -xci, -kbb=s, -kba=s, and -wnxl=s. No significant 
+  bugs have been found since the previous release, but numerous minor issues have 
+  been found and fixed as listed below.
+
+- This version is about 20% faster than the previous version due to optimizations
+  made with the help of Devel::NYTProf.
+
+- Added flag -wnxl=s, --weld-nested-exclusion-list=s, to provide control which containers
   are welded with the --weld-nested-containers parameter.  This is related to issue git #45.
 
 - Merged pull request git #46 which fixes the docs regarding the -fse flag.
 
-- This release is being made to make available a number of new formatting 
-  parameters. No significant bugs have been found since the previous release, 
-  but several minor issues have been found and fixed as listed below.
-
 - Fixed issue git #45, -vtc=n flag was ignored when -wn was set.
 
 - implement request RT #133649, delete-old-newlines selectively. Two parameters, 
@@ -61,9 +65,6 @@
 
 - Added 'state' as a keyword.
 
-- This version is about 20% faster than the previous version due to optimizations
-  made with the help of Devel::NYTProf.
-
 - A better test for convergence has been added. When iterations are requested,
   the new test will stop after the first pass if no changes in line break
   locations are made.  Previously, file checksums were used and required at least two 
index cce2bf0d93ff5854749984c72d722bf4fae3daba..5b0221b236d9ccd2c0c60e054e2b825f79151f14 100644 (file)
 
 <h1 id="VERSION">VERSION</h1>
 
-<p>This man page documents Perl::Tidy version 20201001.03</p>
+<p>This man page documents Perl::Tidy version 20201202</p>
 
 <h1 id="LICENSE">LICENSE</h1>
 
index edcbeda82bac309b20b5f2c5222903bd1b6e45a5..1a5be9e175681216442507a4b763566af6983c2c 100644 (file)
 <dt id="conv---converge"><b>-conv</b>, <b>--converge</b></dt>
 <dd>
 
-<p>This flag is equivalent to <b>-it=4</b> and is included to simplify iteration control. For all practical purposes one either does or does not want to be sure that the output is converged, and there is no penalty to using a large iteration limit since perltidy will check for convergence and stop iterating as soon as possible. The default is <b>-nconv</b> (no convergence check). Using <b>-conv</b> will approximately double run time since normally one extra iteration is required to verify convergence.</p>
+<p>This flag is equivalent to <b>-it=4</b> and is included to simplify iteration control. For all practical purposes one either does or does not want to be sure that the output is converged, and there is no penalty to using a large iteration limit since perltidy will check for convergence and stop iterating as soon as possible. The default is <b>-nconv</b> (no convergence check). Using <b>-conv</b> will approximately double run time since typically one extra iteration is required to verify convergence. No extra iterations are required if no new line breaks are made, and two extra iterations are occasionally needed when reformatting complex code structures, such as deeply nested ternary statements.</p>
 
 </dd>
 </dl>
 
 <h1 id="VERSION">VERSION</h1>
 
-<p>This man page documents perltidy version 20201001.03</p>
+<p>This man page documents perltidy version 20201202</p>
 
 <h1 id="BUG-REPORTS">BUG REPORTS</h1>
 
index b71b3db16cd651e1b13df1a91aebdb84a56d21cf..5160a4b3038abda0ec4a155cd5df6e3a8d737fe1 100644 (file)
@@ -110,7 +110,7 @@ BEGIN {
     # Release version must be bumped, and it is probably past time for a
     # release anyway.
 
-    $VERSION = '20201001.03';
+    $VERSION = '20201202';
 }
 
 sub DESTROY {
@@ -1456,7 +1456,7 @@ EOM
                 elsif ($do_convergence_test) {
 
                     # stop if the formatter has converged
-                    $stop_now ||= defined($iteration_of_formatter_convergence); 
+                    $stop_now ||= defined($iteration_of_formatter_convergence);
 
                     my $digest = $md5_hex->($sink_buffer);
                     if ( !defined( $saw_md5{$digest} ) ) {
@@ -1473,8 +1473,12 @@ EOM
                             # end states.  This has happened in the past
                             # but at present there are no known instances.
                             $convergence_log_message = <<EOM;
-Blinking. Output for iteration $iter same as for $saw_md5{$digest}. 
+BLINKER. Output for iteration $iter same as for $saw_md5{$digest}. 
 EOM
+                            $stopping_on_error ||= $convergence_log_message;
+                            if (DEVEL_MODE) {
+                                print STDERR $convergence_log_message;
+                            }
                             $diagnostics_object->write_diagnostics(
                                 $convergence_log_message)
                               if $diagnostics_object;
@@ -1496,17 +1500,24 @@ EOM
 
                 if ($stop_now) {
 
-                    if (DEVEL_MODE) { #<<<
-                    if ( defined($iteration_of_formatter_convergence) ) {
-                        if ( $iteration_of_formatter_convergence < $iter - 1 ) {
-                            print STDERR
+                    if (DEVEL_MODE) {
+
+                        if ( defined($iteration_of_formatter_convergence) ) {
+
+                            # This message cannot appear unless the formatter
+                            # convergence test above is temporarily skipped for
+                            # testing.
+                            if ( $iteration_of_formatter_convergence <
+                                $iter - 1 )
+                            {
+                                print STDERR
 "STRANGE Early conv in $display_name: Stopping on it=$iter, converged in formatter on $iteration_of_formatter_convergence\n";
+                            }
                         }
-                    }
-                    elsif ( !$stopping_on_error ) {
-                        print STDERR
+                        elsif ( !$stopping_on_error ) {
+                            print STDERR
 "STRANGE no conv in $display_name: stopping on it=$iter, but not converged in formatter\n";
-                    }
+                        }
                     }
 
                     # we are stopping the iterations early;
index dd87a9e1be70514f914d0dac438f24312e584d42..9ff8b49eae0c8e095e6d0d6e375289444c5e881d 100644 (file)
@@ -432,7 +432,7 @@ The module 'Perl::Tidy' comes with a binary 'perltidy' which is installed when t
 
 =head1 VERSION
 
-This man page documents Perl::Tidy version 20201001.03
+This man page documents Perl::Tidy version 20201202
 
 =head1 LICENSE
 
index eb3ad933d33448b5e8887904a660870e526a3fa5..def7d724f9a32440742a73b94152ea88f2ec88e2 100644 (file)
@@ -7,7 +7,7 @@
 package Perl::Tidy::Debugger;
 use strict;
 use warnings;
-our $VERSION = '20201001.03';
+our $VERSION = '20201202';
 
 sub new {
 
index 6a416c19a88cfe1638c35ac2c2bc45458a41d3e6..9ad7ae2204c2bda4bd27390aeb6d486e42334554 100644 (file)
@@ -7,7 +7,7 @@
 package Perl::Tidy::DevNull;
 use strict;
 use warnings;
-our $VERSION = '20201001.03';
+our $VERSION = '20201202';
 sub new   { my $self = shift; return bless {}, $self }
 sub print { return }
 sub close { return }
index 57c1ceb7998f744857143270892689356f342858..cf83d2747dacbe84517758be1a076e2adcafa56b 100644 (file)
@@ -20,7 +20,7 @@
 package Perl::Tidy::Diagnostics;
 use strict;
 use warnings;
-our $VERSION = '20201001.03';
+our $VERSION = '20201202';
 
 sub AUTOLOAD {
 
index a75d1e02e26b09b4f5ac8cc2cc0b79b753f7326a..63b7fde0faa14f199dbf4869e20a970a12568bbd 100644 (file)
@@ -7,7 +7,7 @@
 package Perl::Tidy::FileWriter;
 use strict;
 use warnings;
-our $VERSION = '20201001.03';
+our $VERSION = '20201202';
 
 use constant DEVEL_MODE => 0;
 
index 9fbb899a6948674f2e1a42a4b81a49e2addc00a4..916df977c807212a06f705bcdca4a8476fe5fccc 100644 (file)
@@ -49,7 +49,7 @@ use constant DEVEL_MODE => 0;
 { #<<< A non-indenting brace to contain all lexical variables
 
 use Carp;
-our $VERSION = '20201001.03';
+our $VERSION = '20201202';
 
 # The Tokenizer will be loaded with the Formatter
 ##use Perl::Tidy::Tokenizer;    # for is_keyword()
index da6fb0764394c8b705b096e325c790b7d2676db9..e8413511fc0d42e976e77308401ddc8efefb0d8b 100644 (file)
@@ -7,7 +7,7 @@
 package Perl::Tidy::HtmlWriter;
 use strict;
 use warnings;
-our $VERSION = '20201001.03';
+our $VERSION = '20201202';
 
 use File::Basename;
 
index 3cb64295dcf8f069753d80c5370acf62d1b6978d..92665ccaf6603592aa8ca8bc9912273a4060c318 100644 (file)
@@ -10,7 +10,7 @@ package Perl::Tidy::IOScalar;
 use strict;
 use warnings;
 use Carp;
-our $VERSION = '20201001.03';
+our $VERSION = '20201202';
 
 sub AUTOLOAD {
 
index d4cee2d57e0a2446844a0be1d5ee9e1971b9c56b..fb782fd344559d6d7a9b06b8992c19d4e46b4c00 100644 (file)
@@ -14,7 +14,7 @@ package Perl::Tidy::IOScalarArray;
 use strict;
 use warnings;
 use Carp;
-our $VERSION = '20201001.03';
+our $VERSION = '20201202';
 
 sub AUTOLOAD {
 
index 674bc1626df89f31e2d2d5d19227e6f80dc72a1b..5ded75a1f18bac5e5d1b2636fd0b3f710ffd6978 100644 (file)
@@ -8,7 +8,7 @@
 package Perl::Tidy::IndentationItem;
 use strict;
 use warnings;
-our $VERSION = '20201001.03';
+our $VERSION = '20201202';
 
 BEGIN {
 
index ac368115861528d2d43d370615ca826addc16922..02a85f06af9a54035dc23204cff9fc0ffd2b3ffe 100644 (file)
@@ -12,7 +12,7 @@
 package Perl::Tidy::LineBuffer;
 use strict;
 use warnings;
-our $VERSION = '20201001.03';
+our $VERSION = '20201202';
 
 sub AUTOLOAD {
 
index bfec95b70050b3909a3b689cf9ccc4021de562ef..084e145fa9a4def10779af2c5775fe29e93733a9 100644 (file)
@@ -8,7 +8,7 @@
 package Perl::Tidy::LineSink;
 use strict;
 use warnings;
-our $VERSION = '20201001.03';
+our $VERSION = '20201202';
 
 sub AUTOLOAD {
 
index 0ceb95b76669629ffca927f0b009799dc651fa78..8c3e0c39321cb42d2d10b9ca4d3a0c64fca5ee03 100644 (file)
@@ -8,7 +8,7 @@
 package Perl::Tidy::LineSource;
 use strict;
 use warnings;
-our $VERSION = '20201001.03';
+our $VERSION = '20201202';
 
 sub AUTOLOAD {
 
index 4f197ba806a2b3d48a96f8d32816495934be8d5c..d48a973fd667fbe85d7c6e6ba43037ff97c4541a 100644 (file)
@@ -7,7 +7,7 @@
 package Perl::Tidy::Logger;
 use strict;
 use warnings;
-our $VERSION = '20201001.03';
+our $VERSION = '20201202';
 
 sub AUTOLOAD {
 
index b5cdb620452ed2bf81fadae3bfe19090a32000fd..691af758be9b190f7ea6833cabc2060e72c89500 100644 (file)
@@ -21,7 +21,7 @@
 package Perl::Tidy::Tokenizer;
 use strict;
 use warnings;
-our $VERSION = '20201001.03';
+our $VERSION = '20201202';
 
 use Perl::Tidy::LineBuffer;
 use Carp;
@@ -1636,8 +1636,8 @@ sub prepare_for_a_new_file {
         # If it does not find one of these, or this is a restart, it calls the
         # original scanner directly.
 
-       # This gives the same results as the full scanner in about 1/4 the
-       # total runtime for a typical input stream.
+        # This gives the same results as the full scanner in about 1/4 the
+        # total runtime for a typical input stream.
 
         my $i_begin   = $i;
         my $tok_begin = $tok;
index 978d5fbc10935007eb8900fe2bdef8dfaca73cb1..19922f55a21e0f82e537135efb55b23caab40db6 100644 (file)
@@ -1,7 +1,7 @@
 package Perl::Tidy::VerticalAligner;
 use strict;
 use warnings;
-our $VERSION = '20201001.03';
+our $VERSION = '20201202';
 
 use Perl::Tidy::VerticalAligner::Alignment;
 use Perl::Tidy::VerticalAligner::Line;
index 9ab45cf42993cb168646b8229baf371919d14a2b..e6b0ecabdbded58454a44dd9915e44bad44af2b3 100644 (file)
@@ -10,7 +10,7 @@ use warnings;
 
 { #<<< A non-indenting brace
 
-our $VERSION = '20201001.03';
+our $VERSION = '20201202';
 
 #    _column_          # the current column number
 #    _saved_column_    # a place for temporary storage
index 49044deb1d59bbec26e01f69fbbcc8b7b6a82b63..a747adb956321ba88f1967e5e0a8dfed1be13328 100644 (file)
@@ -8,7 +8,7 @@
 package Perl::Tidy::VerticalAligner::Line;
 use strict;
 use warnings;
-our $VERSION = '20201001.03';
+our $VERSION = '20201202';
 
 BEGIN {
     my $i = 0;
index 1e83ebbb1c4c9e246d67f1ac9284028510bd3f6c..44c5f5c1b55d8368eac94382b9eb3e168c679331 100644 (file)
@@ -9,7 +9,7 @@ Testing revealed that for a line such as
    package        Bob::Dog;
 
 which has extra spaces or even tabs after the keyword 'package', the
-extra spaces or tabs were not being removed.  This was fixed 28 Nov 2020.
+extra spaces or tabs were not being removed.  This was fixed 28 Nov 2020, 008443d.
 The line now formats to
 
     package Bob::Dog;
@@ -18,12 +18,12 @@ The line now formats to
 
 For the parameter combination --indent-only and --closing-side-comments, old
 closing side comments were getting deleted but new closing side comments were
-not made.  A fix was made to prevent this deletion.  This fix was made 27 Nov 2020.
+not made.  A fix was made to prevent this deletion.  This fix was made 27 Nov 2020, 957e0ca.
 
 =item B<fix to stop at 1 iteration when using --indent-only>
 
 Previously, for the combination --indent-only and -conv, two iterations
-would be done.  Only one iteration is necessary in this case.
+would be done.  Only one iteration is necessary in this case.  Fix made 23 Nov 2020, ae493d8.
 
 =item B<fix for formatting signed numbers with spaces>
 
@@ -46,7 +46,7 @@ The next time it is formatted, the '-0.5' counts as one token, resulting in
 
 Notice that the space within the parens around the '-0.5' is gone. An update
 was made to fix this, so that the final state is reached in one step.  This fix
-was made 23 Nov 2020.
+was made 23 Nov 2020, f477c8b.
 
 =item B<fix to prevent conversion of a block comment to hanging side comment>
 
@@ -64,7 +64,7 @@ be converted to be a hanging side comment.  For example:
 For the following specific contitions the block comment in line 2 could be
 converted into a hanging side comment, which is undesirable:
 
-   1. It contains nothing except for a '#'
+   1. The line contains nothing except for a '#' with no leading space
    2. It follows a line with side comment
    3. It has indentation level > 0
 
@@ -74,7 +74,7 @@ value is positive (the default) then a blank line is inserted above the block
 comment to prevent it from becoming a hanging side comment.  If this -mbl is
 zero, then the comment is converted to be a static block comment which again
 prevents it from becoming a hanging side comment. This fix was made 23 Nov
-2020.
+2020, 2eb3de1.
 
 =item B<improved convergence test>
 
@@ -107,7 +107,7 @@ loss of alignment in some cases.  For example
     elsif ( !$m0 && $m1 )               { $CONFIG[1] = 1; }
     else                                { $ok        = 0; last; }
 
-This update was made 15 Nov 2020.
+This update was made 15 Nov 2020, 2b7784d.
 
 =item B<added option -wnxl=s to give control of welding by the -wn parameter>
 
diff --git a/t/snippets/perltidy_common_flags.pl b/t/snippets/perltidy_common_flags.pl
new file mode 100755 (executable)
index 0000000..700771c
--- /dev/null
@@ -0,0 +1,22 @@
+#!/usr/bin/perl -w
+use strict;
+my @files = @ARGV;
+my %saw;
+# Look at a number of .pro profiles and show ther common flags.
+# This can help pinpoint the flags which are causing an issue.
+foreach my $file (@files) {
+    open( IN, "<", $file ) || die "cannot open $file: $!\n";
+    while ( my $line = <IN> ) {
+        chomp $line;
+        $line =~ s/^\s+//;
+        $line =~ s/\s+$//;
+        next if ( $line =~ /#/ );
+        $saw{$line}++;
+    }
+    close IN;
+}
+my $nfiles=@files;
+foreach my $key(sort keys %saw) {
+   next if ($saw{$key} != $nfiles);
+   print $key,"\n";
+}
index 2fa52819a369cdd3b16290ddbc9e9f0ddd0d4e4f..8036b9c547669c64a6ce037abc9225c55f73d769 100755 (executable)
@@ -343,10 +343,7 @@ for (my $nf=$nf_beg; $nf<=$nf_end; $nf++) {
 
         # Set input file for next run
         $ifile = $ifile_original;
-        if ( $case < 4 ) {
-            $ifile = $ofile;
-        }
-        elsif ( $chain_mode && !$err ) {
+        if ( $case >= 4 && $chain_mode && !$err ) {
            # 'Chaining' means the next run formats the output of the previous
            # run instead of formatting the original file.
             # 0 = no chaining
index e7e85073d3d62ec0e2b407e9948ce6e5b937f3a0..4aa10d021dd934cd9d4aec2d05d62ffe8ae9be2e 100755 (executable)
@@ -872,7 +872,7 @@ EOM
 
             # Case 2 creates the smallest possible output file size
             if ( $case == 2 ) {
-                $rrandom_parameters = ["--mangle -dsc -dac -i=0 -ci=0 -it=2"];
+                $rrandom_parameters = ["-dsm -dac -i=0 -ci=0 -it=2 -mbl=0"];
             }
 
             # Case 3 checks extrude from mangle (case 2)