]> git.donarmstrong.com Git - perltidy.git/log
perltidy.git
23 months agoimprove accuracy of guessed old indentation level in a .LOG file
Steve Hancock [Wed, 27 Sep 2023 21:57:11 +0000 (14:57 -0700)]
improve accuracy of guessed old indentation level in a .LOG file

23 months agomove conversion of CR-LF to LF line endings upstream
Steve Hancock [Wed, 27 Sep 2023 15:12:35 +0000 (08:12 -0700)]
move conversion of CR-LF to LF line endings upstream

23 months agofix minor issue with levels reported in logfile
Steve Hancock [Wed, 27 Sep 2023 13:17:15 +0000 (06:17 -0700)]
fix minor issue with levels reported in logfile

23 months agominor cleanups
Steve Hancock [Tue, 26 Sep 2023 23:37:41 +0000 (16:37 -0700)]
minor cleanups

23 months agoadded some checks on leading whitespace
Steve Hancock [Tue, 26 Sep 2023 01:15:27 +0000 (18:15 -0700)]
added some checks on leading whitespace

23 months agoupdate sub operator_expected
Steve Hancock [Mon, 25 Sep 2023 21:58:20 +0000 (14:58 -0700)]
update sub operator_expected

23 months agorevise method for finding leading spaces
Steve Hancock [Mon, 25 Sep 2023 13:40:06 +0000 (06:40 -0700)]
revise method for finding leading spaces

23 months agominor optimizations
Steve Hancock [Sun, 24 Sep 2023 23:26:22 +0000 (16:26 -0700)]
minor optimizations

23 months agoimprove tokenizer efficiency
Steve Hancock [Fri, 22 Sep 2023 03:33:11 +0000 (20:33 -0700)]
improve tokenizer efficiency

23 months agofix case b1460
Steve Hancock [Thu, 21 Sep 2023 15:07:38 +0000 (08:07 -0700)]
fix case b1460

23 months agoadd option to dump if chains
Steve Hancock [Thu, 21 Sep 2023 00:46:30 +0000 (17:46 -0700)]
add option to dump if chains

23 months agoremove unused hanging side comment code, update comments
Steve Hancock [Tue, 19 Sep 2023 00:55:45 +0000 (17:55 -0700)]
remove unused hanging side comment code, update comments

23 months agorewrite hanging side comment code
Steve Hancock [Mon, 18 Sep 2023 04:14:08 +0000 (21:14 -0700)]
rewrite hanging side comment code

2 years agoadd sub initialize_lpxl_lpil
Steve Hancock [Sat, 16 Sep 2023 16:32:44 +0000 (09:32 -0700)]
add sub initialize_lpxl_lpil

2 years agoeliminate sub initialize_lp_part2
Steve Hancock [Sat, 16 Sep 2023 01:49:59 +0000 (18:49 -0700)]
eliminate sub initialize_lp_part2

2 years agobump version to 2023 09 12.01 20230912.01
Steve Hancock [Fri, 15 Sep 2023 22:27:20 +0000 (15:27 -0700)]
bump version to 2023 09 12.01

2 years agofix c269: -ame trouble with hanging side comment
Steve Hancock [Fri, 15 Sep 2023 22:23:11 +0000 (15:23 -0700)]
fix c269: -ame trouble with hanging side comment

2 years agorewrite sub check_options
Steve Hancock [Fri, 15 Sep 2023 20:16:16 +0000 (13:16 -0700)]
rewrite sub check_options

2 years agoremove a call to streamhandle
Steve Hancock [Fri, 15 Sep 2023 01:43:46 +0000 (18:43 -0700)]
remove a call to streamhandle

Streamhandle can be inefficient to use, so I am minimize its use.

2 years agoupdate comments
Steve Hancock [Fri, 15 Sep 2023 01:13:51 +0000 (18:13 -0700)]
update comments

2 years agocleanup some postfix unless terms
Steve Hancock [Thu, 14 Sep 2023 13:56:55 +0000 (06:56 -0700)]
cleanup some postfix unless terms

2 years agofix for git #124 20230912
Steve Hancock [Tue, 12 Sep 2023 19:59:38 +0000 (12:59 -0700)]
fix for git #124

2 years agosimplify Tokenizer interface
Steve Hancock [Sun, 10 Sep 2023 02:30:18 +0000 (19:30 -0700)]
simplify Tokenizer interface

2 years agoswitch lvalue substr to 4-arg substr
Steve Hancock [Sat, 9 Sep 2023 18:26:09 +0000 (11:26 -0700)]
switch lvalue substr to 4-arg substr

An advantage is that this makes the calls similar to 4-arg splice.

2 years agosimplify logic involving __END__
Steve Hancock [Fri, 8 Sep 2023 22:50:19 +0000 (15:50 -0700)]
simplify logic involving __END__

2 years agoupdate to v20230909 20230909
Steve Hancock [Thu, 7 Sep 2023 14:55:32 +0000 (07:55 -0700)]
update to v20230909

2 years agoremove unused code
Steve Hancock [Wed, 6 Sep 2023 02:04:09 +0000 (19:04 -0700)]
remove unused code

2 years agobump version to .04 20230701.04
Steve Hancock [Tue, 5 Sep 2023 14:54:25 +0000 (07:54 -0700)]
bump version to .04

2 years agoadd parameters --add-missing-else and --warn-missing-else
Steve Hancock [Tue, 5 Sep 2023 03:44:27 +0000 (20:44 -0700)]
add parameters --add-missing-else and --warn-missing-else

2 years agoActive two PC Policies
Steve Hancock [Mon, 4 Sep 2023 22:13:01 +0000 (15:13 -0700)]
Active two PC Policies

ControlStructures::ProhibitNegativeExpressionsInUnlessAndUntilConditions, and
ControlStructures::ProhibitPostfixControls

2 years agosimplify some logic
Steve Hancock [Sun, 3 Sep 2023 22:56:33 +0000 (15:56 -0700)]
simplify some logic

2 years agoeliminate dangling elsif's
Steve Hancock [Sun, 3 Sep 2023 02:55:15 +0000 (19:55 -0700)]
eliminate dangling elsif's

2 years agoactivate ControlStructures::ProhibitUnlessBlocks, part 3
Steve Hancock [Sat, 2 Sep 2023 00:29:35 +0000 (17:29 -0700)]
activate ControlStructures::ProhibitUnlessBlocks, part 3

2 years agoactivate ControlStructures::ProhibitUnlessBlocks, part 2
Steve Hancock [Fri, 1 Sep 2023 23:22:12 +0000 (16:22 -0700)]
activate ControlStructures::ProhibitUnlessBlocks, part 2

2 years agoactivate ControlStructures::ProhibitUnlessBlocks, part 1
Steve Hancock [Fri, 1 Sep 2023 22:11:29 +0000 (15:11 -0700)]
activate ControlStructures::ProhibitUnlessBlocks, part 1

2 years agofix incorrect log file message
Steve Hancock [Fri, 1 Sep 2023 00:54:53 +0000 (17:54 -0700)]
fix incorrect log file message

2 years agoadd Tokenizer missing terminal else blocks
Steve Hancock [Thu, 31 Aug 2023 22:30:46 +0000 (15:30 -0700)]
add Tokenizer missing terminal else blocks

2 years agoadd some missing terminal else blocks
Steve Hancock [Thu, 31 Aug 2023 00:52:31 +0000 (17:52 -0700)]
add some missing terminal else blocks

Some dangling elsif's still exist in Formatter and Tokenizer

2 years agoactivate RegularExpressions::ProhibitComplexRegexes
Steve Hancock [Wed, 30 Aug 2023 02:06:59 +0000 (19:06 -0700)]
activate RegularExpressions::ProhibitComplexRegexes

Had to use a large count. First tried to use ##no critic but hit PC bugs

2 years agoActivate PC policy Subroutines::ProhibitBuiltinHomonyms
Steve Hancock [Tue, 29 Aug 2023 22:07:34 +0000 (15:07 -0700)]
Activate PC policy Subroutines::ProhibitBuiltinHomonyms

2 years agoActivate PC BuiltinFunctions::ProhibitStringyEval
Steve Hancock [Tue, 29 Aug 2023 02:33:33 +0000 (19:33 -0700)]
Activate PC BuiltinFunctions::ProhibitStringyEval

2 years agoupdate docs
Steve Hancock [Mon, 28 Aug 2023 20:46:55 +0000 (13:46 -0700)]
update docs

2 years agominor change in syntax of --use-feature
Steve Hancock [Mon, 28 Aug 2023 01:24:03 +0000 (18:24 -0700)]
minor change in syntax of --use-feature

The default behavior remains the same.  Details in CHANGES

2 years agoactivate PC ProhibitLocalVars and RequireInitializationForLocalVars
Steve Hancock [Sat, 26 Aug 2023 23:00:23 +0000 (16:00 -0700)]
activate PC ProhibitLocalVars and RequireInitializationForLocalVars

These policies no longer needed to be skipped

2 years agoclean up some cr/lf code
Steve Hancock [Sat, 26 Aug 2023 22:57:24 +0000 (15:57 -0700)]
clean up some cr/lf code

2 years agoeliminate dummy sub close from IOScalar & IOScalarArray
Steve Hancock [Sat, 26 Aug 2023 18:33:46 +0000 (11:33 -0700)]
eliminate dummy sub close from IOScalar & IOScalarArray

2 years agoactivate PC RegularExpressions::ProhibitSingleCharAlternation
Steve Hancock [Thu, 24 Aug 2023 22:43:56 +0000 (15:43 -0700)]
activate PC RegularExpressions::ProhibitSingleCharAlternation

2 years agoactivate ProhibitUnusedCapture and ProhibitCaptureWithoutTest
Steve Hancock [Thu, 24 Aug 2023 17:36:06 +0000 (10:36 -0700)]
activate ProhibitUnusedCapture and ProhibitCaptureWithoutTest

This makes a few changes to allow perltidy to pass these these tests. But
PerlCritic misses many of these, so I'll fix them as I find them.

2 years agoactivate PC -RegularExpressions::RequireBracesForMultiline
Steve Hancock [Thu, 24 Aug 2023 16:25:40 +0000 (09:25 -0700)]
activate PC -RegularExpressions::RequireBracesForMultiline

2 years agobump to version 20230701.03 20230701.03
Steve Hancock [Thu, 24 Aug 2023 02:38:40 +0000 (19:38 -0700)]
bump to version 20230701.03

2 years agoupdate perlcritic settings
Steve Hancock [Wed, 23 Aug 2023 23:01:15 +0000 (16:01 -0700)]
update perlcritic settings

2 years agofix b1459, edge of stability issue for -xlp
Steve Hancock [Wed, 23 Aug 2023 18:37:50 +0000 (11:37 -0700)]
fix b1459, edge of stability issue for -xlp

2 years agoconvert two boolean grep's to 'first'
Steve Hancock [Wed, 23 Aug 2023 17:42:51 +0000 (10:42 -0700)]
convert two boolean grep's to 'first'

Allows perlcritic to check for this; needed to use 'List::Util::first' since
'any' was not in Perl 5.8.

2 years agoclean up CR/LF coding
Steve Hancock [Wed, 23 Aug 2023 15:29:44 +0000 (08:29 -0700)]
clean up CR/LF coding

2 years agoimprove tokenization of --use-feature=class
Steve Hancock [Wed, 23 Aug 2023 00:27:47 +0000 (17:27 -0700)]
improve tokenization of --use-feature=class

2 years agomake all print filehandles braced
Steve Hancock [Mon, 21 Aug 2023 17:59:43 +0000 (10:59 -0700)]
make all print filehandles braced

This can now be checked with perlcritic

2 years agosharpen identification of indirect objects
Steve Hancock [Mon, 21 Aug 2023 04:52:17 +0000 (21:52 -0700)]
sharpen identification of indirect objects

2 years agofix an issue with line-ending blanks (c258)
Steve Hancock [Mon, 21 Aug 2023 00:10:07 +0000 (17:10 -0700)]
fix an issue with line-ending blanks (c258)

No real cases have been found where this changes formatting,
but it is possible to construct a case where it could produce unwanted
spacing just on the first time perltidy is run. It would be corrected on the
next run because perltidy trims trailing blanks from code lines.

2 years agotest to see if braced filehandle passes on all systems
Steve Hancock [Sat, 19 Aug 2023 22:33:48 +0000 (15:33 -0700)]
test to see if braced filehandle passes on all systems

If this passes everywhere I may update the other modules

2 years agoupdate comments
Steve Hancock [Sat, 19 Aug 2023 22:28:48 +0000 (15:28 -0700)]
update comments

2 years agoeliminate module DevNull.pm
Steve Hancock [Sat, 19 Aug 2023 22:27:33 +0000 (15:27 -0700)]
eliminate module DevNull.pm

2 years agoconvert a do while into a while in sub pre_tokenizer
Steve Hancock [Sat, 19 Aug 2023 14:02:11 +0000 (07:02 -0700)]
convert a do while into a while in sub pre_tokenizer

This makes it easier to read

2 years agofix issue c250 part 2, new sub token type S
Steve Hancock [Fri, 18 Aug 2023 19:21:00 +0000 (12:21 -0700)]
fix issue c250 part 2, new sub token type S

2 years agofix issue c250 part 1, new package token type P
Steve Hancock [Thu, 17 Aug 2023 14:42:31 +0000 (07:42 -0700)]
fix issue c250 part 1, new package token type P

2 years agorewrite sub pre_tokenize for improved efficiency
Steve Hancock [Tue, 15 Aug 2023 16:00:07 +0000 (09:00 -0700)]
rewrite sub pre_tokenize for improved efficiency

This is a time-critical routine. It runs over 2x faster now compared to the
previous release.

2 years agooptimize pretoken search order
Steve Hancock [Tue, 15 Aug 2023 05:15:45 +0000 (22:15 -0700)]
optimize pretoken search order

Benchmarking shows that this simple change speeds up perltidy about 0.5%

2 years agoread config file with slurp_stream instead of streamhandle
Steve Hancock [Tue, 15 Aug 2023 01:48:55 +0000 (18:48 -0700)]
read config file with slurp_stream instead of streamhandle

All calls to streamhandle are now of type 'w' only. This eliminates some
confusion over which code is responsible for setting binary mode on
read, and is more efficient.

2 years agominor optimization
Steve Hancock [Tue, 15 Aug 2023 00:10:43 +0000 (17:10 -0700)]
minor optimization

2 years agoremove unused variable
Steve Hancock [Mon, 14 Aug 2023 21:51:43 +0000 (14:51 -0700)]
remove unused variable

2 years agosimplify coding for GCString length function
Steve Hancock [Mon, 14 Aug 2023 17:26:32 +0000 (10:26 -0700)]
simplify coding for GCString length function

2 years agoavoid calling GCString length function when possible
Steve Hancock [Mon, 14 Aug 2023 03:27:02 +0000 (20:27 -0700)]
avoid calling GCString length function when possible

This speeds up processing large utf8 files about 4%

2 years agodo not call Encode::Guess for pure ascii files
Steve Hancock [Thu, 10 Aug 2023 14:12:52 +0000 (07:12 -0700)]
do not call Encode::Guess for pure ascii files

This speeds up perltidy by about 2% for most perl scripts.

2 years agoswitch from regex to hash lookup for anonymous subs
Steve Hancock [Wed, 9 Aug 2023 15:57:30 +0000 (08:57 -0700)]
switch from regex to hash lookup for anonymous subs

2 years agoimprove efficiency of a data transfer optimization
Steve Hancock [Wed, 9 Aug 2023 14:06:08 +0000 (07:06 -0700)]
improve efficiency of a data transfer optimization

2 years agosimplify final IO step
Steve Hancock [Wed, 9 Aug 2023 14:05:33 +0000 (07:05 -0700)]
simplify final IO step

2 years agosimplify some IO operations
Steve Hancock [Wed, 9 Aug 2023 01:56:44 +0000 (18:56 -0700)]
simplify some IO operations

2 years agomake several improvements in efficiency
Steve Hancock [Mon, 7 Aug 2023 00:13:12 +0000 (17:13 -0700)]
make several improvements in efficiency

2 years agosimplify coding of sub compare_string_buffers
Steve Hancock [Sun, 6 Aug 2023 01:09:28 +0000 (18:09 -0700)]
simplify coding of sub compare_string_buffers

2 years agoadd test case for file with just one character, '0'
Steve Hancock [Sun, 6 Aug 2023 01:08:54 +0000 (18:08 -0700)]
add test case for file with just one character, '0'

2 years agoimprove file input efficiency
Steve Hancock [Sun, 6 Aug 2023 00:04:21 +0000 (17:04 -0700)]
improve file input efficiency

this decreases the time to read a large file by a factor of about 100

2 years agoimprove tokenizer efficiency
Steve Hancock [Thu, 3 Aug 2023 03:57:11 +0000 (20:57 -0700)]
improve tokenizer efficiency

2 years agooptimize tokenizer inner loop
Steve Hancock [Wed, 2 Aug 2023 15:07:24 +0000 (08:07 -0700)]
optimize tokenizer inner loop

2 years agoremove most remaining unused ci coding
Steve Hancock [Tue, 1 Aug 2023 00:55:03 +0000 (17:55 -0700)]
remove most remaining unused ci coding

2 years agominor fix for CORE::
Steve Hancock [Mon, 31 Jul 2023 14:23:07 +0000 (07:23 -0700)]
minor fix for CORE::

it is better to use 'type' instead of 'tok' even though they are the same here

2 years agoremove several unused variables
Steve Hancock [Sat, 29 Jul 2023 13:20:43 +0000 (06:20 -0700)]
remove several unused variables

2 years agobump version to 20230701.02 20230701.02
Steve Hancock [Fri, 28 Jul 2023 15:42:25 +0000 (08:42 -0700)]
bump version to 20230701.02

2 years agoremove unused old code for setting continuation indentation
Steve Hancock [Fri, 28 Jul 2023 15:33:29 +0000 (08:33 -0700)]
remove unused old code for setting continuation indentation

2 years agoconvert some input strings to string refs for efficiency
Steve Hancock [Thu, 27 Jul 2023 17:36:27 +0000 (10:36 -0700)]
convert some input strings to string refs for efficiency

2 years agoconvert some output strings to string refs for efficiency
Steve Hancock [Thu, 27 Jul 2023 13:45:26 +0000 (06:45 -0700)]
convert some output strings to string refs for efficiency

2 years agoadd sub 'write_tidy_output' to consolidate output logic
Steve Hancock [Wed, 26 Jul 2023 14:44:14 +0000 (07:44 -0700)]
add sub 'write_tidy_output' to consolidate output logic

2 years agoremove unused modules LineBuffer, LineSink, LineSource
Steve Hancock [Wed, 26 Jul 2023 13:31:33 +0000 (06:31 -0700)]
remove unused modules LineBuffer, LineSink, LineSource

2 years agominor optimization of tokenizer main loop
Steve Hancock [Tue, 25 Jul 2023 13:44:59 +0000 (06:44 -0700)]
minor optimization of tokenizer main loop

2 years agofix c236
Steve Hancock [Tue, 25 Jul 2023 03:12:18 +0000 (20:12 -0700)]
fix c236

2 years agoremove unused code
Steve Hancock [Tue, 25 Jul 2023 01:11:11 +0000 (18:11 -0700)]
remove unused code

2 years agorewrite sub process_filter_layer
Steve Hancock [Mon, 24 Jul 2023 19:12:46 +0000 (12:12 -0700)]
rewrite sub process_filter_layer

2 years agoadd ability to write to SCALAR and ARRAY refs
Steve Hancock [Sun, 23 Jul 2023 00:01:27 +0000 (17:01 -0700)]
add ability to write to SCALAR and ARRAY refs

this is needed for a future update

2 years agosimplify some i/o logic; eliminate one call to LineSink
Steve Hancock [Fri, 21 Jul 2023 16:55:03 +0000 (09:55 -0700)]
simplify some i/o logic; eliminate one call to LineSink

2 years agoupdate docs
Steve Hancock [Thu, 20 Jul 2023 22:38:27 +0000 (15:38 -0700)]
update docs

2 years agoadd another error check for -line-range-tidy
Steve Hancock [Thu, 20 Jul 2023 22:24:39 +0000 (15:24 -0700)]
add another error check for -line-range-tidy

2 years agoadd parameter --line-range-tidy=n1:n2 (see git #122) 20230701.01
Steve Hancock [Tue, 18 Jul 2023 15:24:58 +0000 (08:24 -0700)]
add parameter --line-range-tidy=n1:n2 (see git #122)