]> git.donarmstrong.com Git - perltidy.git/log
perltidy.git
23 months 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.

23 months 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%

23 months 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.

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

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

23 months 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

23 months 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%

23 months 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.

23 months 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

23 months 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

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

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

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

23 months 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

23 months 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'

23 months 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)

2 years agosimplify code for line-endings
Steve Hancock [Mon, 17 Jul 2023 22:05:52 +0000 (15:05 -0700)]
simplify code for line-endings

2 years agoavoid PerlCritic complaint
Steve Hancock [Fri, 14 Jul 2023 14:19:44 +0000 (07:19 -0700)]
avoid PerlCritic complaint

2 years agoeliminate final use of Perl::Tidy::LineSource
Steve Hancock [Thu, 13 Jul 2023 23:49:07 +0000 (16:49 -0700)]
eliminate final use of Perl::Tidy::LineSource

2 years agoeliminate a call to Perl::Tidy::LineSource for efficiency
Steve Hancock [Thu, 13 Jul 2023 22:06:03 +0000 (15:06 -0700)]
eliminate a call to Perl::Tidy::LineSource for efficiency

2 years agoadd error checks
Steve Hancock [Thu, 13 Jul 2023 16:36:49 +0000 (09:36 -0700)]
add error checks

2 years agoignore code-skipping sections when guessing indentation
Steve Hancock [Wed, 12 Jul 2023 17:50:26 +0000 (10:50 -0700)]
ignore code-skipping sections when guessing indentation

This could happen if a script started with a code-skipping section

2 years agofix b1458
Steve Hancock [Wed, 12 Jul 2023 03:17:41 +0000 (20:17 -0700)]
fix b1458

2 years agoeliminate use of Perl::Tidy::LineBuffer
Steve Hancock [Wed, 12 Jul 2023 01:04:04 +0000 (18:04 -0700)]
eliminate use of Perl::Tidy::LineBuffer

this improves efficiency and will simplify error checking

2 years agofix c231
Steve Hancock [Sat, 8 Jul 2023 03:04:52 +0000 (20:04 -0700)]
fix c231

2 years agofix issue b1457
Steve Hancock [Fri, 7 Jul 2023 14:51:27 +0000 (07:51 -0700)]
fix issue b1457

2 years agoadd syntax check at '){', issue c230
Steve Hancock [Fri, 7 Jul 2023 14:06:04 +0000 (07:06 -0700)]
add syntax check at '){', issue c230

2 years agoupdate docs
Steve Hancock [Fri, 7 Jul 2023 00:12:07 +0000 (17:12 -0700)]
update docs

2 years agofix typo
Steve Hancock [Tue, 4 Jul 2023 00:47:00 +0000 (17:47 -0700)]
fix typo

2 years agoadd -s option to convergence test utility
Steve Hancock [Tue, 4 Jul 2023 00:46:23 +0000 (17:46 -0700)]
add -s option to convergence test utility

2 years agoupdate to v20230701 20230701
Steve Hancock [Fri, 30 Jun 2023 22:38:02 +0000 (15:38 -0700)]
update to v20230701

2 years agobump version to .04 20230309.04
Steve Hancock [Tue, 27 Jun 2023 03:46:21 +0000 (20:46 -0700)]
bump version to .04

2 years agofix b1456
Steve Hancock [Mon, 26 Jun 2023 18:41:42 +0000 (11:41 -0700)]
fix b1456

2 years agochange param name -ipcsl to -ipc
Steve Hancock [Mon, 26 Jun 2023 16:42:40 +0000 (09:42 -0700)]
change param name -ipcsl to -ipc

This simplifies documentation

2 years agoadd option -ipscl
Steve Hancock [Mon, 26 Jun 2023 01:47:34 +0000 (18:47 -0700)]
add option -ipscl

2 years agofix spelling, add some comments, remove a bad html link
Steve Hancock [Fri, 23 Jun 2023 00:44:41 +0000 (17:44 -0700)]
fix spelling, add some comments, remove a bad html link

2 years agoActivate perlcritic policy Variables::ProhibitPackageVars
Steve Hancock [Thu, 22 Jun 2023 14:00:29 +0000 (07:00 -0700)]
Activate perlcritic policy Variables::ProhibitPackageVars

2 years agochange default from -xbtl=kt to -xbtl=k
Steve Hancock [Wed, 21 Jun 2023 21:37:48 +0000 (14:37 -0700)]
change default from -xbtl=kt to -xbtl=k

2 years agoadd note on multiple encodings in a file
Steve Hancock [Sun, 18 Jun 2023 22:53:19 +0000 (15:53 -0700)]
add note on multiple encodings in a file

2 years agofix issue b1455
Steve Hancock [Thu, 15 Jun 2023 16:19:07 +0000 (09:19 -0700)]
fix issue b1455

2 years agofix debug message
Steve Hancock [Thu, 15 Jun 2023 13:54:15 +0000 (06:54 -0700)]
fix debug message

2 years agoavoid poor alignment of lines with different ci (issue c225)
Steve Hancock [Thu, 15 Jun 2023 13:48:30 +0000 (06:48 -0700)]
avoid poor alignment of lines with different ci (issue c225)

2 years agofix doc
Steve Hancock [Wed, 14 Jun 2023 18:45:30 +0000 (11:45 -0700)]
fix doc

2 years agoDo not align opening braces across ci level changes (c224)
Steve Hancock [Wed, 14 Jun 2023 18:24:17 +0000 (11:24 -0700)]
Do not align opening braces across ci level changes (c224)

2 years agoupdate docs for -xbt and -xbtl
Steve Hancock [Wed, 14 Jun 2023 18:23:07 +0000 (11:23 -0700)]
update docs for -xbt and -xbtl

2 years agoremove any space between isolated '$' and '{' (c221)
Steve Hancock [Mon, 12 Jun 2023 02:21:44 +0000 (19:21 -0700)]
remove any space between isolated '$' and '{' (c221)

2 years agoavoid testing files known to produce errors
Steve Hancock [Sun, 11 Jun 2023 21:56:29 +0000 (14:56 -0700)]
avoid testing files known to produce errors

2 years agofix semicolon count; minor code cleanups
Steve Hancock [Sun, 11 Jun 2023 19:07:50 +0000 (12:07 -0700)]
fix semicolon count; minor code cleanups

2 years agobump vertion to 20230309.03 20230309.03
Steve Hancock [Sat, 10 Jun 2023 22:12:44 +0000 (15:12 -0700)]
bump vertion to 20230309.03

2 years agoadd parameters -xbt, -xbtl; see issue git #121
Steve Hancock [Sat, 10 Jun 2023 02:55:08 +0000 (19:55 -0700)]
add parameters -xbt, -xbtl; see issue git #121

2 years agosimplify and improve efficiency of sub set_ci
Steve Hancock [Tue, 6 Jun 2023 01:20:31 +0000 (18:20 -0700)]
simplify and improve efficiency of sub set_ci

2 years agoincrease max_mccabe
Steve Hancock [Tue, 6 Jun 2023 01:20:16 +0000 (18:20 -0700)]
increase max_mccabe

2 years agofix undef when -dbs applied to script without subs
Steve Hancock [Mon, 5 Jun 2023 01:50:54 +0000 (18:50 -0700)]
fix undef when -dbs applied to script without subs

2 years agosimplify coding to use available comma counts
Steve Hancock [Sun, 4 Jun 2023 23:51:06 +0000 (16:51 -0700)]
simplify coding to use available comma counts

2 years agoimprove formatting of sort/map/grep blocks
Steve Hancock [Mon, 29 May 2023 13:14:27 +0000 (06:14 -0700)]
improve formatting of sort/map/grep blocks

2 years agominor optimization
Steve Hancock [Sun, 28 May 2023 00:36:25 +0000 (17:36 -0700)]
minor optimization

2 years agoadd a clarifying comment
Steve Hancock [Sun, 28 May 2023 00:36:05 +0000 (17:36 -0700)]
add a clarifying comment

2 years agooptimization
Steve Hancock [Fri, 26 May 2023 22:05:50 +0000 (15:05 -0700)]
optimization

2 years agooptimizations
Steve Hancock [Fri, 26 May 2023 17:50:44 +0000 (10:50 -0700)]
optimizations

2 years agofix spelling
Steve Hancock [Fri, 26 May 2023 17:50:30 +0000 (10:50 -0700)]
fix spelling

2 years agofix ci of a comment in a ternary expression
Steve Hancock [Thu, 25 May 2023 20:14:24 +0000 (13:14 -0700)]
fix ci of a comment in a ternary expression

2 years agoupdate docs
Steve Hancock [Thu, 25 May 2023 20:13:50 +0000 (13:13 -0700)]
update docs

2 years agoOptimizations, mostly avoiding needless calls
Steve Hancock [Wed, 24 May 2023 17:06:49 +0000 (10:06 -0700)]
Optimizations, mostly avoiding needless calls

2 years agoreformat
Steve Hancock [Wed, 24 May 2023 16:36:59 +0000 (09:36 -0700)]
reformat

2 years agoupdate docs
Steve Hancock [Wed, 24 May 2023 16:36:39 +0000 (09:36 -0700)]
update docs

2 years agooptimization of sub tokenizer_wrapup_no_ci
Steve Hancock [Mon, 22 May 2023 19:50:33 +0000 (12:50 -0700)]
optimization of sub tokenizer_wrapup_no_ci

2 years agoupdate docs
Steve Hancock [Mon, 22 May 2023 19:50:19 +0000 (12:50 -0700)]
update docs

2 years agoupdate docs
Steve Hancock [Sat, 20 May 2023 02:12:39 +0000 (19:12 -0700)]
update docs

2 years agoadd doc on ci update
Steve Hancock [Sat, 20 May 2023 00:33:12 +0000 (17:33 -0700)]
add doc on ci update

2 years agooptimization of some new code
Steve Hancock [Fri, 19 May 2023 16:27:00 +0000 (09:27 -0700)]
optimization of some new code

2 years agoactivate sub set_ci
Steve Hancock [Fri, 19 May 2023 02:59:30 +0000 (19:59 -0700)]
activate sub set_ci

2 years agoadd option to skip ci calc in tokenizer
Steve Hancock [Wed, 17 May 2023 14:21:48 +0000 (07:21 -0700)]
add option to skip ci calc in tokenizer

This will be the future default

2 years agorecent updates to sub set_ci
Steve Hancock [Tue, 16 May 2023 21:32:03 +0000 (14:32 -0700)]
recent updates to sub set_ci

all open issues with sub set_ci have been resolved

2 years agominor fixes for sub set_ci
Steve Hancock [Wed, 10 May 2023 20:42:38 +0000 (13:42 -0700)]
minor fixes for sub set_ci

2 years agominor fixes for sub set_ci
Steve Hancock [Sun, 7 May 2023 13:52:19 +0000 (06:52 -0700)]
minor fixes for sub set_ci

2 years agominor fixes to sub set_ci
Steve Hancock [Fri, 5 May 2023 13:52:21 +0000 (06:52 -0700)]
minor fixes to sub set_ci

2 years agoimprove indentation of comments within deeply nested ternaries
Steve Hancock [Sun, 30 Apr 2023 22:29:22 +0000 (15:29 -0700)]
improve indentation of comments within deeply nested ternaries

2 years agostreamline sub set_ci
Steve Hancock [Sat, 29 Apr 2023 04:21:02 +0000 (21:21 -0700)]
streamline sub set_ci

2 years agoimprove and optimize sub set_ci
Steve Hancock [Fri, 28 Apr 2023 02:24:46 +0000 (19:24 -0700)]
improve and optimize sub set_ci

2 years agoInsure correct marking of a brace following a format stmt
Steve Hancock [Wed, 26 Apr 2023 12:45:38 +0000 (05:45 -0700)]
Insure correct marking of a brace following a format stmt

This does not change formatting but insures that braces
are correctly marked. This fixes issue c202/t032.