From 9a5c1a9f48f22b9d1ce7a5937d3cde20f7893072 Mon Sep 17 00:00:00 2001 From: Steve Hancock Date: Tue, 25 Jun 2024 08:58:43 -0700 Subject: [PATCH] bump version to 20240511.04 --- CHANGES.md | 10 +++++++++- bin/perltidy | 2 +- docs/ChangeLog.html | 14 ++++++++++++-- docs/Tidy.html | 2 +- docs/perltidy.html | 22 +++++++++++++++------- lib/Perl/Tidy.pm | 2 +- lib/Perl/Tidy.pod | 2 +- lib/Perl/Tidy/Debugger.pm | 2 +- lib/Perl/Tidy/Diagnostics.pm | 2 +- lib/Perl/Tidy/FileWriter.pm | 2 +- lib/Perl/Tidy/Formatter.pm | 2 +- lib/Perl/Tidy/HtmlWriter.pm | 2 +- lib/Perl/Tidy/IOScalar.pm | 2 +- lib/Perl/Tidy/IOScalarArray.pm | 2 +- lib/Perl/Tidy/IndentationItem.pm | 2 +- lib/Perl/Tidy/Logger.pm | 2 +- lib/Perl/Tidy/Tokenizer.pm | 2 +- lib/Perl/Tidy/VerticalAligner.pm | 2 +- lib/Perl/Tidy/VerticalAligner/Alignment.pm | 2 +- lib/Perl/Tidy/VerticalAligner/Line.pm | 2 +- 20 files changed, 53 insertions(+), 27 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 6f9a7fc3..5555ee03 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,6 +1,14 @@ # Perltidy Change Log -## 2024 05 11.03 +## 2024 05 11.04 + + - Updates for issue git #151: + (1) --warn-variable-types=u is now okay if it is on the command line + with a named file. + (2) --warn-variable-exclusion-list=s now allows leading and/or + trailing * on variable names to allow a wildcard match. For example + -wvxl='*_unused' is okay. + (3) --dump-unusual-variables now outputs the filename. - A option was added to filter unimplemented parameters from perltidy configuration files, suggested in git #146. If a line in the config diff --git a/bin/perltidy b/bin/perltidy index 1756a25d..cf9a5b7c 100755 --- a/bin/perltidy +++ b/bin/perltidy @@ -6672,7 +6672,7 @@ The perltidy binary uses the Perl::Tidy module and is installed when that module =head1 VERSION -This man page documents perltidy version 20240511.03 +This man page documents perltidy version 20240511.04 =head1 BUG REPORTS diff --git a/docs/ChangeLog.html b/docs/ChangeLog.html index 2e4ab846..bf99bd5c 100644 --- a/docs/ChangeLog.html +++ b/docs/ChangeLog.html @@ -1,8 +1,18 @@

Perltidy Change Log

-

2024 05 11.02

+

2024 05 11.04

-
- Fix issue git #143, extend -add-trailing-commas to apply to a list
+
- A option was added to filter unimplemented parameters from perltidy
+  configuration files, suggested in git #146.  If a line in the config
+  file begins with three dashes followed by a parameter name
+  (rather than two), then the line will be removed if the parameter is
+  unknown. Otherwise, a dash will be removed to make the line valid.
+
+- Parameters --dump-mismatched-args (or -dma) and
+  --warn-mismatched-arg (or -wma) have been updated to catch more
+  arg count issues.
+
+- Fix issue git #143, extend -add-trailing-commas to apply to a list
   with just a fat comma.
 
 - Fix issue git #142, test failure installing on perl versions before
diff --git a/docs/Tidy.html b/docs/Tidy.html
index 672d5c1b..12f79c0d 100644
--- a/docs/Tidy.html
+++ b/docs/Tidy.html
@@ -399,7 +399,7 @@
 
 

VERSION

-

This man page documents Perl::Tidy version 20240511.02

+

This man page documents Perl::Tidy version 20240511.04

LICENSE

diff --git a/docs/perltidy.html b/docs/perltidy.html index c85cfa86..a66b214d 100644 --- a/docs/perltidy.html +++ b/docs/perltidy.html @@ -4420,6 +4420,12 @@ + +
Skipping a line with an unknown parameter
+
+ +

Versions of perltidy greater than 20240511 have an option to filter unrecognized parameters from a perltidy command file. If a line in the file begins with three dashes followed by a parameter name (rather than one or two), then the line will be removed if the parameter is unknown. Otherwise, a dash will be removed to make the line valid. This option was added to allow a single command file to be used during the transition to a new version of perltidy.

+
Creating a new abbreviation
@@ -4726,13 +4732,15 @@

will process somefile.pl normally but issue a warning if either of the issues 's' or 'r', but not 'p', described above, are encountered.

-

A limitation is that warnings may not be requested for unused variables, type 'u'. The is because this would produce many needless warnings, especially when perltidy is run on small snippets of code from within an editor. So unused variables can only be found with the -duv option described in the previous section.

+

The 'u' option (unused) has a limitation: it is not allowed in a .perltidyrc configuration file. But it can be used on the command line provided that perltidy is operating on a named file. This rule is necessary to avoid warnings when perltidy is run on small snippets of code from within an editor.

+ +

A companion flag, --warn-variable-exclusion-list=string, or -wvxl=string, can be used to skip warning checks for a list of variable names. A leading and/or trailing '*' may be placed on any of these variable names to allow a partial match. For example

-

A companion flag, --warn-variable-exclusion-list=string, or -wvxl=string, can be used to skip warning checks for a list of variables. For example,

+

For example,

-
   perltidy -wvt='*' -wvxl='$self $class'  somefile.pl
+
   perltidy -wvt='*' -wvxl='$self $class *_unused'  somefile.pl
-

will do all possible checks but not report any warnings for variables $self and $class.

+

will do all possible checks but not report any warnings for variables $self, $class, and for example $value_unused.

Use --dump-mixed-call-parens to find functions called both with and without parens
@@ -4843,7 +4851,7 @@
    -
  • This option works best for subs which unpack call args in an orderly manner near the beginning of the sub from @_ and/or with shift operations. If individual elements of the @_ array are directly accessed then the number of sub args is considered indeterminate.

    +
  • This option works best for subs which unpack call args in an orderly manner near the beginning of the sub from @_ and/or with shift operations. It will also work for direct access to specific elements of the @_ array. However if the coding for arg extraction is complex then the number of sub args will be considered indeterminate and a count cannot be checked.

  • Sub calls made without parentheses around the args are not checked.

    @@ -4861,7 +4869,7 @@
    Use --warn-mismatched-args to produce a warning for function calls with args not matching sub declarations.
    -

    This is similar to the -dump parameter described above except that any mismatches are reported in the error file and otherwise formatting continues normally. Thus

    +

    This is similar to the -dump parameter described above except that any mismatches are reported in the error file and otherwise formatting continues normally. The basic usage is

        perltidy -wma somefile.pl
    @@ -5212,7 +5220,7 @@

    VERSION

    -

    This man page documents perltidy version 20240511.02

    +

    This man page documents perltidy version 20240511.04

    BUG REPORTS

    diff --git a/lib/Perl/Tidy.pm b/lib/Perl/Tidy.pm index c7b24bca..a1a5b7f2 100644 --- a/lib/Perl/Tidy.pm +++ b/lib/Perl/Tidy.pm @@ -131,7 +131,7 @@ BEGIN { # then the Release version must be bumped, and it is probably past time for # a release anyway. - $VERSION = '20240511.03'; + $VERSION = '20240511.04'; } ## end BEGIN sub DESTROY { diff --git a/lib/Perl/Tidy.pod b/lib/Perl/Tidy.pod index f909341b..5043f83a 100644 --- a/lib/Perl/Tidy.pod +++ b/lib/Perl/Tidy.pod @@ -469,7 +469,7 @@ The module 'Perl::Tidy' comes with a binary 'perltidy' which is installed when t =head1 VERSION -This man page documents Perl::Tidy version 20240511.03 +This man page documents Perl::Tidy version 20240511.04 =head1 LICENSE diff --git a/lib/Perl/Tidy/Debugger.pm b/lib/Perl/Tidy/Debugger.pm index 5c0fb243..41e8a504 100644 --- a/lib/Perl/Tidy/Debugger.pm +++ b/lib/Perl/Tidy/Debugger.pm @@ -8,7 +8,7 @@ package Perl::Tidy::Debugger; use strict; use warnings; use English qw( -no_match_vars ); -our $VERSION = '20240511.03'; +our $VERSION = '20240511.04'; use constant EMPTY_STRING => q{}; use constant SPACE => q{ }; diff --git a/lib/Perl/Tidy/Diagnostics.pm b/lib/Perl/Tidy/Diagnostics.pm index 987079d1..ddc62058 100644 --- a/lib/Perl/Tidy/Diagnostics.pm +++ b/lib/Perl/Tidy/Diagnostics.pm @@ -18,7 +18,7 @@ package Perl::Tidy::Diagnostics; use strict; use warnings; use English qw( -no_match_vars ); -our $VERSION = '20240511.03'; +our $VERSION = '20240511.04'; use constant EMPTY_STRING => q{}; diff --git a/lib/Perl/Tidy/FileWriter.pm b/lib/Perl/Tidy/FileWriter.pm index e4250a2b..66a5d161 100644 --- a/lib/Perl/Tidy/FileWriter.pm +++ b/lib/Perl/Tidy/FileWriter.pm @@ -16,7 +16,7 @@ package Perl::Tidy::FileWriter; use strict; use warnings; -our $VERSION = '20240511.03'; +our $VERSION = '20240511.04'; use constant DEVEL_MODE => 0; use constant EMPTY_STRING => q{}; diff --git a/lib/Perl/Tidy/Formatter.pm b/lib/Perl/Tidy/Formatter.pm index 6b054b75..5f59089d 100644 --- a/lib/Perl/Tidy/Formatter.pm +++ b/lib/Perl/Tidy/Formatter.pm @@ -76,7 +76,7 @@ use constant BACKSLASH => q{\\}; use Carp; use English qw( -no_match_vars ); use List::Util qw( min max first ); # min, max first are in Perl 5.8 -our $VERSION = '20240511.03'; +our $VERSION = '20240511.04'; # The Tokenizer will be loaded with the Formatter ##use Perl::Tidy::Tokenizer; # for is_keyword() diff --git a/lib/Perl/Tidy/HtmlWriter.pm b/lib/Perl/Tidy/HtmlWriter.pm index aa695d59..6e4a3ad7 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 = '20240511.03'; +our $VERSION = '20240511.04'; use Carp; use English qw( -no_match_vars ); diff --git a/lib/Perl/Tidy/IOScalar.pm b/lib/Perl/Tidy/IOScalar.pm index 628076fb..3ae70c0d 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 = '20240511.03'; +our $VERSION = '20240511.04'; use constant DEVEL_MODE => 0; use constant EMPTY_STRING => q{}; diff --git a/lib/Perl/Tidy/IOScalarArray.pm b/lib/Perl/Tidy/IOScalarArray.pm index 1e5fed1f..8c7ac042 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 = '20240511.03'; +our $VERSION = '20240511.04'; use constant DEVEL_MODE => 0; diff --git a/lib/Perl/Tidy/IndentationItem.pm b/lib/Perl/Tidy/IndentationItem.pm index 1ce26a8f..00213847 100644 --- a/lib/Perl/Tidy/IndentationItem.pm +++ b/lib/Perl/Tidy/IndentationItem.pm @@ -9,7 +9,7 @@ package Perl::Tidy::IndentationItem; use strict; use warnings; -our $VERSION = '20240511.03'; +our $VERSION = '20240511.04'; BEGIN { diff --git a/lib/Perl/Tidy/Logger.pm b/lib/Perl/Tidy/Logger.pm index b9c9c5f8..1aba77de 100644 --- a/lib/Perl/Tidy/Logger.pm +++ b/lib/Perl/Tidy/Logger.pm @@ -8,7 +8,7 @@ package Perl::Tidy::Logger; use strict; use warnings; -our $VERSION = '20240511.03'; +our $VERSION = '20240511.04'; use Carp; use English qw( -no_match_vars ); diff --git a/lib/Perl/Tidy/Tokenizer.pm b/lib/Perl/Tidy/Tokenizer.pm index 492b6362..ef5ce0b3 100644 --- a/lib/Perl/Tidy/Tokenizer.pm +++ b/lib/Perl/Tidy/Tokenizer.pm @@ -33,7 +33,7 @@ use strict; use warnings; use English qw( -no_match_vars ); -our $VERSION = '20240511.03'; +our $VERSION = '20240511.04'; use Carp; diff --git a/lib/Perl/Tidy/VerticalAligner.pm b/lib/Perl/Tidy/VerticalAligner.pm index 79236b5f..9d04f438 100644 --- a/lib/Perl/Tidy/VerticalAligner.pm +++ b/lib/Perl/Tidy/VerticalAligner.pm @@ -5,7 +5,7 @@ use Carp; { #<<< A non-indenting brace to contain all lexical variables -our $VERSION = '20240511.03'; +our $VERSION = '20240511.04'; use English qw( -no_match_vars ); use Scalar::Util 'refaddr'; use Perl::Tidy::VerticalAligner::Alignment; diff --git a/lib/Perl/Tidy/VerticalAligner/Alignment.pm b/lib/Perl/Tidy/VerticalAligner/Alignment.pm index ec611fd2..7388f12f 100644 --- a/lib/Perl/Tidy/VerticalAligner/Alignment.pm +++ b/lib/Perl/Tidy/VerticalAligner/Alignment.pm @@ -9,7 +9,7 @@ package Perl::Tidy::VerticalAligner::Alignment; use strict; use warnings; -our $VERSION = '20240511.03'; +our $VERSION = '20240511.04'; sub new { my ( $class, $rarg ) = @_; diff --git a/lib/Perl/Tidy/VerticalAligner/Line.pm b/lib/Perl/Tidy/VerticalAligner/Line.pm index 40964579..c5718dab 100644 --- a/lib/Perl/Tidy/VerticalAligner/Line.pm +++ b/lib/Perl/Tidy/VerticalAligner/Line.pm @@ -10,7 +10,7 @@ package Perl::Tidy::VerticalAligner::Line; use strict; use warnings; -our $VERSION = '20240511.03'; +our $VERSION = '20240511.04'; use English qw( -no_match_vars ); sub AUTOLOAD { -- 2.39.5