From: Steve Hancock <perltidy@users.sourceforge.net> Date: Mon, 28 Sep 2020 20:08:52 +0000 (-0700) Subject: updates for next release X-Git-Tag: 20201001^0 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=794759e2523ee58f6e46b5d98f4e45d09d6dd990;p=perltidy.git updates for next release --- diff --git a/CHANGES.md b/CHANGES.md index 0ca916b3..29a3b6a7 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,6 +1,13 @@ # Perltidy Change Log -## 2020 09 07.01 +## 2020 10 01 + + - Robustness of perltidy has been significantly improved. Updating is recommended. Continual + automated testing runs began about 1 Sep 2020 and numerous issues have been found and fixed. + Many involve references to uninitialized variables when perltidy is fed random text and random + control parameters. A complete list is given in the file + + https://github.com/perltidy/perltidy/blob/master/local-docs/BugLog.pod - Added the token '->' to the list of alignment tokens, as suggested in git #39, so that it can be vertically aligned if a space is placed before them with -wls='->'. @@ -12,12 +19,6 @@ - Added keyword 'isa'. - - Numerous issues have been found during automated testing and fixed. Many involve references to - uninitialized variables when perltidy is given random text. A complete list is given in - the file - - https://github.com/perltidy/perltidy/blob/master/local-docs/BugLog.pod - ## 2020 09 07 - Fixed bug git #37, an error when the combination -scbb -csc was used. diff --git a/MANIFEST b/MANIFEST index 0a3137dd..c0347468 100644 --- a/MANIFEST +++ b/MANIFEST @@ -3,6 +3,7 @@ bin/perltidy BUGS.md CHANGES.md COPYING +docs/BugLog.html docs/ChangeLog.html docs/index.html docs/index.md @@ -70,6 +71,7 @@ t/snippets19.t t/snippets2.t t/snippets20.t t/snippets21.t +t/snippets22.t t/snippets3.t t/snippets4.t t/snippets5.t diff --git a/bin/perltidy b/bin/perltidy index 12d6a3f4..b1b7d890 100755 --- a/bin/perltidy +++ b/bin/perltidy @@ -4283,7 +4283,7 @@ The perltidy binary uses the Perl::Tidy module and is installed when that module =head1 VERSION -This man page documents perltidy version 20200907.01 +This man page documents perltidy version 20201001 =head1 BUG REPORTS diff --git a/docs/BugLog.html b/docs/BugLog.html index 25494409..476bbf36 100644 --- a/docs/BugLog.html +++ b/docs/BugLog.html @@ -21,6 +21,22 @@ <dl> +<dt id="Keep-any-space-between-a-bareword-and-quote"><b>Keep any space between a bareword and quote</b></dt> +<dd> + +<p>In random testing, the -mangle option introduced a syntax error by deleting the space between barewords and quotes (test file 'MxScreen'), such as:</p> + +<pre><code> oops"Your login, $Bad_Login, is not valid";</code></pre> + +<p>Sub 'is_essential_whitespace' was updated to prevent this on 27 Sep 2020, in 'keep any space between a bareword and quote', f32553c.</p> + +</dd> +<dt id="Fixed-some-incorrect-indentation-disagreements-reported-in-LOG-file"><b>Fixed some incorrect indentation disagreements reported in LOG file</b></dt> +<dd> + +<p>The .LOG file reports any disagreements between the indentation of the input and output files. This can help locate brace errors. These were incorrect when some of the options were used, including --whitespace-cycle, -bbhb, -nib. This was corrected 24 Sep 2020, 'fixed incorrect log entry for indentation disagreement', 3d40545. At the same time, locations of closing brace indentation disagreements are now tracked and reported in the .ERR file when there is a brace error. This can help localize the error if the file was previously formatted by perltidy.</p> + +</dd> <dt id="If-an-cut-starts-a-POD-section-within-code-give-a-warning"><b>If an =cut starts a POD section within code, give a warning</b></dt> <dd> @@ -30,13 +46,17 @@ <dt id="Switched-from-using-an-eval-block-to-the--can-function-for-sub-finish_formatting"><b>Switched from using an eval block to the -</b>can() function for sub finish_formatting></dt> <dd> -<p>This is not a bug, but is cleaner coding and insures that error messages get reported. This change was made 20 Sep 2020.</p> +<p>This is not a bug, but is cleaner coding and insures that error messages get reported. This change was made 20 Sep 2020, 'switch from eval { } to ->can('finish_formatting')', 28f2a4f.</p> </dd> <dt id="fixed-uninitialized-value-reference"><b>fixed uninitialized value reference</b></dt> <dd> -<p>The following message was generated during automated testing Use of uninitialized value $cti in numeric eq (==) at /home/steve/bin/Perl/Tidy/Formatter.pm line 12079. Use of uninitialized value $cti in numeric eq (==) at /home/steve/bin/Perl/Tidy/Formatter.pm line 12089. Use of uninitialized value $cti in numeric eq (==) at /home/steve/bin/Perl/Tidy/Formatter.pm line 12097.</p> +<p>The following message was generated during automated testing</p> + +<pre><code> Use of uninitialized value $cti in numeric eq (==) at /home/steve/bin/Perl/Tidy/Formatter.pm line 12079. + Use of uninitialized value $cti in numeric eq (==) at /home/steve/bin/Perl/Tidy/Formatter.pm line 12089. + Use of uninitialized value $cti in numeric eq (==) at /home/steve/bin/Perl/Tidy/Formatter.pm line 12097.</code></pre> <p>The problem could be simplified to running perltidy -wn on this snippet:</p> diff --git a/docs/ChangeLog.html b/docs/ChangeLog.html index 247b8b18..1322e7af 100644 --- a/docs/ChangeLog.html +++ b/docs/ChangeLog.html @@ -1,8 +1,15 @@ <h1>Perltidy Change Log</h1> -<h2>2020 09 07.01</h2> +<h2>2020 10 01</h2> -<pre><code>- Added the token '->' to the list of alignment tokens, as suggested in git +<pre><code>- Robustness of perltidy has been significantly improved. Updating is recommended. Continual + automated testing runs began about 1 Sep 2020 and numerous issues have been found and fixed. + Many involve references to uninitialized variables when perltidy is fed random text and random + control parameters. A complete list is given in the file + + https://github.com/perltidy/perltidy/blob/master/local-docs/BugLog.pod + +- Added the token '->' to the list of alignment tokens, as suggested in git #39, so that it can be vertically aligned if a space is placed before them with -wls='->'. - Added parameters -bbhb=n (--break-before-hash-brace=n), -bbsb=n (--break-before-square-bracket=n), @@ -11,12 +18,6 @@ control indentation of these tokens. - Added keyword 'isa'. - -- Numerous issues have been found during automated testing and fixed. Many involve references to - uninitialized variables when perltidy is given random text. A complete list is given in - the file - - https://github.com/perltidy/perltidy/blob/master/local-docs/BugLog.pod </code></pre> <h2>2020 09 07</h2> diff --git a/docs/Tidy.html b/docs/Tidy.html index 70770128..d484ed58 100644 --- a/docs/Tidy.html +++ b/docs/Tidy.html @@ -372,7 +372,7 @@ <h1 id="VERSION">VERSION</h1> -<p>This man page documents Perl::Tidy version 20200907.01</p> +<p>This man page documents Perl::Tidy version 20201001</p> <h1 id="LICENSE">LICENSE</h1> diff --git a/docs/perltidy.html b/docs/perltidy.html index f5887ec8..95d6455c 100644 --- a/docs/perltidy.html +++ b/docs/perltidy.html @@ -3313,7 +3313,7 @@ <h1 id="VERSION">VERSION</h1> -<p>This man page documents perltidy version 20200907.01</p> +<p>This man page documents perltidy version 20201001</p> <h1 id="BUG-REPORTS">BUG REPORTS</h1> diff --git a/lib/Perl/Tidy.pm b/lib/Perl/Tidy.pm index 792dd77e..f5d25532 100644 --- a/lib/Perl/Tidy.pm +++ b/lib/Perl/Tidy.pm @@ -107,7 +107,7 @@ BEGIN { # Release version must be bumped, and it is probably past time for a # release anyway. - $VERSION = '20200907.01'; + $VERSION = '20201001'; } sub DESTROY { diff --git a/lib/Perl/Tidy.pod b/lib/Perl/Tidy.pod index 6c41ddb5..922766b1 100644 --- a/lib/Perl/Tidy.pod +++ b/lib/Perl/Tidy.pod @@ -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 20200907.01 +This man page documents Perl::Tidy version 20201001 =head1 LICENSE diff --git a/lib/Perl/Tidy/Debugger.pm b/lib/Perl/Tidy/Debugger.pm index fef6ee58..96ad3f3f 100644 --- a/lib/Perl/Tidy/Debugger.pm +++ b/lib/Perl/Tidy/Debugger.pm @@ -7,7 +7,7 @@ package Perl::Tidy::Debugger; use strict; use warnings; -our $VERSION = '20200907.01'; +our $VERSION = '20201001'; sub new { diff --git a/lib/Perl/Tidy/DevNull.pm b/lib/Perl/Tidy/DevNull.pm index 34c65e26..19dab097 100644 --- a/lib/Perl/Tidy/DevNull.pm +++ b/lib/Perl/Tidy/DevNull.pm @@ -7,7 +7,7 @@ package Perl::Tidy::DevNull; use strict; use warnings; -our $VERSION = '20200907.01'; +our $VERSION = '20201001'; sub new { my $self = shift; return bless {}, $self } sub print { return } sub close { return } diff --git a/lib/Perl/Tidy/Diagnostics.pm b/lib/Perl/Tidy/Diagnostics.pm index 7362dc17..1d97be6f 100644 --- a/lib/Perl/Tidy/Diagnostics.pm +++ b/lib/Perl/Tidy/Diagnostics.pm @@ -20,7 +20,7 @@ package Perl::Tidy::Diagnostics; use strict; use warnings; -our $VERSION = '20200907.01'; +our $VERSION = '20201001'; sub AUTOLOAD { @@ -42,6 +42,7 @@ EOM } sub DESTROY { + # required to avoid call to AUTOLOAD in some versions of perl } diff --git a/lib/Perl/Tidy/FileWriter.pm b/lib/Perl/Tidy/FileWriter.pm index 0a470444..2aa8f66e 100644 --- a/lib/Perl/Tidy/FileWriter.pm +++ b/lib/Perl/Tidy/FileWriter.pm @@ -7,7 +7,7 @@ package Perl::Tidy::FileWriter; use strict; use warnings; -our $VERSION = '20200907.01'; +our $VERSION = '20201001'; sub AUTOLOAD { @@ -29,6 +29,7 @@ EOM } sub DESTROY { + # required to avoid call to AUTOLOAD in some versions of perl } diff --git a/lib/Perl/Tidy/Formatter.pm b/lib/Perl/Tidy/Formatter.pm index 21cf3ba9..819a1087 100644 --- a/lib/Perl/Tidy/Formatter.pm +++ b/lib/Perl/Tidy/Formatter.pm @@ -46,7 +46,7 @@ use warnings; { #<<< A non-indenting brace to contain all lexical variables use Carp; -our $VERSION = '20200907.01'; +our $VERSION = '20201001'; # The Tokenizer will be loaded with the Formatter ##use Perl::Tidy::Tokenizer; # for is_keyword() @@ -11983,10 +11983,11 @@ sub set_continuation_breaks { # $forced_breakpoint_to_go[$i] # may be updated to be =1 for any index $i after which there must be # a break. This signals later routines not to undo the breakpoint. - use constant DEBUG_BREAKPOINTS => 0; my ( $self, $saw_good_break ) = @_; + use constant DEBUG_BREAKPOINTS => 0; + my @i_first = (); # the first index to output my @i_last = (); # the last index to output my @i_colon_breaks = (); # needed to decide if we have to break at ?'s diff --git a/lib/Perl/Tidy/HtmlWriter.pm b/lib/Perl/Tidy/HtmlWriter.pm index 62bc7541..7c74c30f 100644 --- a/lib/Perl/Tidy/HtmlWriter.pm +++ b/lib/Perl/Tidy/HtmlWriter.pm @@ -7,7 +7,7 @@ package Perl::Tidy::HtmlWriter; use strict; use warnings; -our $VERSION = '20200907.01'; +our $VERSION = '20201001'; use File::Basename; @@ -44,7 +44,7 @@ sub AUTOLOAD { # some diagnostic information. This sub should never be called # except for a programming error. our $AUTOLOAD; - return if ($AUTOLOAD eq 'DESTROY'); + return if ( $AUTOLOAD eq 'DESTROY' ); my ( $pkg, $fname, $lno ) = caller(); print STDERR <<EOM; ====================================================================== @@ -58,6 +58,7 @@ EOM } sub DESTROY { + # required to avoid call to AUTOLOAD in some versions of perl } diff --git a/lib/Perl/Tidy/IOScalar.pm b/lib/Perl/Tidy/IOScalar.pm index 0f3d820b..2bd94749 100644 --- a/lib/Perl/Tidy/IOScalar.pm +++ b/lib/Perl/Tidy/IOScalar.pm @@ -10,7 +10,7 @@ package Perl::Tidy::IOScalar; use strict; use warnings; use Carp; -our $VERSION = '20200907.01'; +our $VERSION = '20201001'; sub AUTOLOAD { @@ -32,6 +32,7 @@ EOM } sub DESTROY { + # required to avoid call to AUTOLOAD in some versions of perl } diff --git a/lib/Perl/Tidy/IOScalarArray.pm b/lib/Perl/Tidy/IOScalarArray.pm index 44d3fe58..e555a8ee 100644 --- a/lib/Perl/Tidy/IOScalarArray.pm +++ b/lib/Perl/Tidy/IOScalarArray.pm @@ -14,7 +14,7 @@ package Perl::Tidy::IOScalarArray; use strict; use warnings; use Carp; -our $VERSION = '20200907.01'; +our $VERSION = '20201001'; sub AUTOLOAD { @@ -36,6 +36,7 @@ EOM } sub DESTROY { + # required to avoid call to AUTOLOAD in some versions of perl } diff --git a/lib/Perl/Tidy/IndentationItem.pm b/lib/Perl/Tidy/IndentationItem.pm index 0359620b..298f5f66 100644 --- a/lib/Perl/Tidy/IndentationItem.pm +++ b/lib/Perl/Tidy/IndentationItem.pm @@ -8,7 +8,7 @@ package Perl::Tidy::IndentationItem; use strict; use warnings; -our $VERSION = '20200907.01'; +our $VERSION = '20201001'; BEGIN { @@ -53,6 +53,7 @@ EOM } sub DESTROY { + # required to avoid call to AUTOLOAD in some versions of perl } diff --git a/lib/Perl/Tidy/LineBuffer.pm b/lib/Perl/Tidy/LineBuffer.pm index 7aa2fcd3..a4414527 100644 --- a/lib/Perl/Tidy/LineBuffer.pm +++ b/lib/Perl/Tidy/LineBuffer.pm @@ -12,7 +12,7 @@ package Perl::Tidy::LineBuffer; use strict; use warnings; -our $VERSION = '20200907.01'; +our $VERSION = '20201001'; sub AUTOLOAD { @@ -34,6 +34,7 @@ EOM } sub DESTROY { + # required to avoid call to AUTOLOAD in some versions of perl } diff --git a/lib/Perl/Tidy/LineSink.pm b/lib/Perl/Tidy/LineSink.pm index e8b1306a..61944eb5 100644 --- a/lib/Perl/Tidy/LineSink.pm +++ b/lib/Perl/Tidy/LineSink.pm @@ -8,7 +8,7 @@ package Perl::Tidy::LineSink; use strict; use warnings; -our $VERSION = '20200907.01'; +our $VERSION = '20201001'; sub AUTOLOAD { @@ -30,6 +30,7 @@ EOM } sub DESTROY { + # required to avoid call to AUTOLOAD in some versions of perl } diff --git a/lib/Perl/Tidy/LineSource.pm b/lib/Perl/Tidy/LineSource.pm index 2261c54c..8e6eccec 100644 --- a/lib/Perl/Tidy/LineSource.pm +++ b/lib/Perl/Tidy/LineSource.pm @@ -8,7 +8,7 @@ package Perl::Tidy::LineSource; use strict; use warnings; -our $VERSION = '20200907.01'; +our $VERSION = '20201001'; sub AUTOLOAD { @@ -30,6 +30,7 @@ EOM } sub DESTROY { + # required to avoid call to AUTOLOAD in some versions of perl } diff --git a/lib/Perl/Tidy/Logger.pm b/lib/Perl/Tidy/Logger.pm index 294b505a..998811f9 100644 --- a/lib/Perl/Tidy/Logger.pm +++ b/lib/Perl/Tidy/Logger.pm @@ -7,7 +7,7 @@ package Perl::Tidy::Logger; use strict; use warnings; -our $VERSION = '20200907.01'; +our $VERSION = '20201001'; sub AUTOLOAD { @@ -29,6 +29,7 @@ EOM } sub DESTROY { + # required to avoid call to AUTOLOAD in some versions of perl } diff --git a/lib/Perl/Tidy/Tokenizer.pm b/lib/Perl/Tidy/Tokenizer.pm index 2389ab3f..63615533 100644 --- a/lib/Perl/Tidy/Tokenizer.pm +++ b/lib/Perl/Tidy/Tokenizer.pm @@ -21,7 +21,7 @@ package Perl::Tidy::Tokenizer; use strict; use warnings; -our $VERSION = '20200907.01'; +our $VERSION = '20201001'; use Perl::Tidy::LineBuffer; use Carp; diff --git a/lib/Perl/Tidy/VerticalAligner.pm b/lib/Perl/Tidy/VerticalAligner.pm index 59180f52..f0bb2080 100644 --- a/lib/Perl/Tidy/VerticalAligner.pm +++ b/lib/Perl/Tidy/VerticalAligner.pm @@ -1,7 +1,7 @@ package Perl::Tidy::VerticalAligner; use strict; use warnings; -our $VERSION = '20200907.01'; +our $VERSION = '20201001'; use Perl::Tidy::VerticalAligner::Alignment; use Perl::Tidy::VerticalAligner::Line; diff --git a/lib/Perl/Tidy/VerticalAligner/Alignment.pm b/lib/Perl/Tidy/VerticalAligner/Alignment.pm index 9d3c0a83..c4f2556f 100644 --- a/lib/Perl/Tidy/VerticalAligner/Alignment.pm +++ b/lib/Perl/Tidy/VerticalAligner/Alignment.pm @@ -7,7 +7,7 @@ package Perl::Tidy::VerticalAligner::Alignment; use strict; use warnings; -our $VERSION = '20200907.01'; +our $VERSION = '20201001'; { @@ -50,7 +50,7 @@ our $VERSION = '20200907.01'; } sub AUTOLOAD { - + # Catch any undefined sub calls so that we are sure to get # some diagnostic information. This sub should never be called # except for a programming error. diff --git a/lib/Perl/Tidy/VerticalAligner/Line.pm b/lib/Perl/Tidy/VerticalAligner/Line.pm index 50de123e..a56ebede 100644 --- a/lib/Perl/Tidy/VerticalAligner/Line.pm +++ b/lib/Perl/Tidy/VerticalAligner/Line.pm @@ -8,7 +8,7 @@ package Perl::Tidy::VerticalAligner::Line; use strict; use warnings; -our $VERSION = '20200907.01'; +our $VERSION = '20201001'; { @@ -68,12 +68,12 @@ our $VERSION = '20200907.01'; } sub AUTOLOAD { - + # Catch any undefined sub calls so that we are sure to get # some diagnostic information. This sub should never be called # except for a programming error. our $AUTOLOAD; - return if ($AUTOLOAD eq 'DESTROY'); + return if ( $AUTOLOAD eq 'DESTROY' ); my ( $pkg, $fname, $lno ) = caller(); print STDERR <<EOM; ====================================================================== diff --git a/local-docs/BugLog.pod b/local-docs/BugLog.pod index 51d592ae..a22ff1e1 100644 --- a/local-docs/BugLog.pod +++ b/local-docs/BugLog.pod @@ -13,7 +13,8 @@ the space between barewords and quotes (test file 'MxScreen'), such as: oops"Your login, $Bad_Login, is not valid"; -Sub is_essential_whitespace was updated to prevent this on 27 Sep 2020. +Sub 'is_essential_whitespace' was updated to prevent this on 27 Sep 2020, +in 'keep any space between a bareword and quote', f32553c. =item B<Fixed some incorrect indentation disagreements reported in LOG file> @@ -36,7 +37,7 @@ a -dp flag and it took some time to understand the results because of the lack o =item B<Switched from using an eval block to the ->can() function for sub finish_formatting> This is not a bug, but is cleaner coding and insures that error messages get reported. -This change was made 20 Sep 2020. +This change was made 20 Sep 2020, 'switch from eval { } to ->can('finish_formatting')', 28f2a4f. =item B<fixed uninitialized value reference> diff --git a/local-docs/Release-Checklist.md b/local-docs/Release-Checklist.md index bb4794d9..ceeb03b3 100644 --- a/local-docs/Release-Checklist.md +++ b/local-docs/Release-Checklist.md @@ -3,6 +3,7 @@ - review tickets at [rt.cpan.org](https://rt.cpan.org/Public/Dist/Display.html?Name=Perl-Tidy) - review the issues at [github](https://github.com/perltidy/perltidy/issues/) - compare the new version with previous version on all files in test area +- run random testing on final version for a significant time before releasing (several days) - run 'author tests' on a much larger body of code than is covered by the .t files. - compare results of the current version with previous version