]> git.donarmstrong.com Git - perltidy.git/log
perltidy.git
2 years agoremove unused code for alternating iteration directions
Steve Hancock [Fri, 13 Jan 2023 20:40:46 +0000 (12:40 -0800)]
remove unused code for alternating iteration directions

This worked okay but I deactivated it some time ago because there is a danger
that it could cause formatting instability (oscillating states).

2 years agoremove needless check to simplify
Steve Hancock [Fri, 13 Jan 2023 19:55:49 +0000 (11:55 -0800)]
remove needless check to simplify

2 years agosimplify coding for essential old breakpoints
Steve Hancock [Fri, 13 Jan 2023 15:53:21 +0000 (07:53 -0800)]
simplify coding for essential old breakpoints

This eliminates the need for variable _ris_essential_old_breakpoint_

2 years agolist @type_sequence_to_go now allows undefs for efficiency
Steve Hancock [Fri, 13 Jan 2023 01:38:19 +0000 (17:38 -0800)]
list @type_sequence_to_go now allows undefs for efficiency

2 years agoallow array mate_index_to_go to contain undefs
Steve Hancock [Thu, 12 Jan 2023 14:16:17 +0000 (06:16 -0800)]
allow array mate_index_to_go to contain undefs

2 years agoallow undefs in array block_type_to_go
Steve Hancock [Tue, 10 Jan 2023 14:10:56 +0000 (06:10 -0800)]
allow undefs in array block_type_to_go

2 years agooptimize use of 2 sparse arrays
Steve Hancock [Tue, 10 Jan 2023 00:02:40 +0000 (16:02 -0800)]
optimize use of 2 sparse arrays

arrays @old_breakpoints_to_go and @forced_breakpoints_to_go are sparse; it is
more efficient to rely on undefs at unused indexes instead of 0's

2 years agofix formatting
Steve Hancock [Sat, 7 Jan 2023 15:44:37 +0000 (07:44 -0800)]
fix formatting

2 years agoremove unused line
Steve Hancock [Sat, 7 Jan 2023 15:26:37 +0000 (07:26 -0800)]
remove unused line

The old parameters 'check-syntax' and 'perl-syntax-check-flags' are now
ignored but still retained to avoid breaking old .perltidyrc files.

2 years agoupdate tests for issue c171 fix (excess iterations)
Steve Hancock [Sat, 7 Jan 2023 03:17:31 +0000 (19:17 -0800)]
update tests for issue c171 fix (excess iterations)

2 years agominor optimization
Steve Hancock [Sat, 7 Jan 2023 03:17:17 +0000 (19:17 -0800)]
minor optimization

2 years agofix excessive recombine iterations, issue c171
Steve Hancock [Sat, 7 Jan 2023 00:33:39 +0000 (16:33 -0800)]
fix excessive recombine iterations, issue c171

2 years agoupdate --dump-block-summary to improve package stats
Steve Hancock [Fri, 6 Jan 2023 15:17:16 +0000 (07:17 -0800)]
update --dump-block-summary to improve package stats

This update should complete the -dbs feature implementation.

2 years agoremove travis CI config file
Steve Hancock [Wed, 4 Jan 2023 18:02:57 +0000 (10:02 -0800)]
remove travis CI config file

2 years agoadd 'mccabe_count' to variables dumped with -dbs
Steve Hancock [Wed, 4 Jan 2023 17:43:09 +0000 (09:43 -0800)]
add 'mccabe_count' to variables dumped with -dbs

2 years agobump to version 20221112.03 20221112.03
Steve Hancock [Mon, 2 Jan 2023 23:51:46 +0000 (15:51 -0800)]
bump to version 20221112.03

2 years agoadd --use-feature=class, part 2
Steve Hancock [Mon, 2 Jan 2023 23:41:56 +0000 (15:41 -0800)]
add --use-feature=class, part 2

Updates have been made to allow the default setting of --use-feature
to be --use-feature=class.  This can be turned off with --use-feature=' '.

2 years agoadd --use-feature=class, part 1
Steve Hancock [Sat, 31 Dec 2022 17:24:04 +0000 (09:24 -0800)]
add --use-feature=class, part 1

This version adds option --use-feature='class' to format code using "use feature 'class'" (see rt145706).  The main changes are:

'class' is treated as a generalization of 'package'. It is updated to accept
attributes and an optional BLOCK.

'method' is handled using the existing --sub-alias-list option,
  i.e. --sub-alias-list=method

'field' is treated the same as 'my'

'ADJUST' is treated like 'BEGIN'

In a future update, the new option --use-feature="class" will be set
to be the default.  That requires some additional updates to avoid
conflicts with older uses of these keywords.

2 years agobreak sub set_vertical_alignment_markers into two
Steve Hancock [Mon, 26 Dec 2022 21:21:21 +0000 (13:21 -0800)]
break sub set_vertical_alignment_markers into two

2 years agodelete unused code
Steve Hancock [Sun, 25 Dec 2022 16:46:54 +0000 (08:46 -0800)]
delete unused code

2 years agodivide sub xlp_collapsed_lengths into two subs
Steve Hancock [Sun, 25 Dec 2022 14:07:34 +0000 (06:07 -0800)]
divide sub xlp_collapsed_lengths into two subs

2 years agodivide sub recombine_breakpoints into two parts
Steve Hancock [Sat, 24 Dec 2022 22:53:35 +0000 (14:53 -0800)]
divide sub recombine_breakpoints into two parts

2 years agofix c167
Steve Hancock [Sat, 24 Dec 2022 00:24:10 +0000 (16:24 -0800)]
fix c167

2 years agobreak sub correct_lp_indentation_pass into two subs
Steve Hancock [Fri, 23 Dec 2022 00:04:07 +0000 (16:04 -0800)]
break sub correct_lp_indentation_pass into two subs

2 years agofix b1442
Steve Hancock [Thu, 22 Dec 2022 20:31:37 +0000 (12:31 -0800)]
fix b1442

2 years agobump version to 20221112.02 20221112.02
Steve Hancock [Wed, 21 Dec 2022 15:09:30 +0000 (07:09 -0800)]
bump version to 20221112.02

2 years agofix edge case b1443
Steve Hancock [Wed, 21 Dec 2022 14:42:23 +0000 (06:42 -0800)]
fix edge case b1443

2 years agoadd option -bfvt=n, see issue git #110
Steve Hancock [Tue, 20 Dec 2022 17:17:24 +0000 (09:17 -0800)]
add option -bfvt=n, see issue git #110

2 years agoadd --cuddeled-paren-brace, suggested in git #110
Steve Hancock [Sun, 18 Dec 2022 05:31:01 +0000 (21:31 -0800)]
add --cuddeled-paren-brace, suggested in git #110

2 years agoadd non-blank, non-comment code line count to -dbs output
Steve Hancock [Sun, 18 Dec 2022 00:55:27 +0000 (16:55 -0800)]
add non-blank, non-comment code line count to -dbs output

2 years agofix b1441
Steve Hancock [Thu, 15 Dec 2022 19:32:06 +0000 (11:32 -0800)]
fix b1441

2 years agoissue c166, avoid applying -sfp if it might cause problems
Steve Hancock [Thu, 15 Dec 2022 14:18:58 +0000 (06:18 -0800)]
issue c166, avoid applying -sfp if it might cause problems

2 years agoupdate --dump-block-summary to mark nested loops
Steve Hancock [Wed, 14 Dec 2022 04:39:05 +0000 (20:39 -0800)]
update --dump-block-summary to mark nested loops

Nested loops are marked in the output with a +, and they can
be selected with a postfix + on the loop type.

2 years agoreplace array iprev_to_go with a function for efficiency
Steve Hancock [Mon, 12 Dec 2022 23:37:31 +0000 (15:37 -0800)]
replace array iprev_to_go with a function for efficiency

2 years agosimplify and optimize sub store_space
Steve Hancock [Mon, 12 Dec 2022 15:08:10 +0000 (07:08 -0800)]
simplify and optimize sub store_space

2 years agosimplify and optimize sub set_whitespace_flag
Steve Hancock [Sun, 11 Dec 2022 20:39:02 +0000 (12:39 -0800)]
simplify and optimize sub set_whitespace_flag

2 years agominor optimizations for sub set_whitespace_flags
Steve Hancock [Sat, 10 Dec 2022 21:00:46 +0000 (13:00 -0800)]
minor optimizations for sub set_whitespace_flags

2 years agoautomate error checks in random testing
Steve Hancock [Sat, 10 Dec 2022 16:09:58 +0000 (08:09 -0800)]
automate error checks in random testing

2 years agosimplify wording for -dbs
Steve Hancock [Sat, 10 Dec 2022 16:08:16 +0000 (08:08 -0800)]
simplify wording for -dbs

2 years agoconvert sub keyword_group_scan into a closure
Steve Hancock [Sat, 10 Dec 2022 00:08:03 +0000 (16:08 -0800)]
convert sub keyword_group_scan into a closure

2 years agoreplace sub is_broken_block with hash value _is_broken_container_
Steve Hancock [Fri, 9 Dec 2022 15:36:41 +0000 (07:36 -0800)]
replace sub is_broken_block with hash value _is_broken_container_

2 years agoupdate docs
Steve Hancock [Thu, 8 Dec 2022 19:22:37 +0000 (11:22 -0800)]
update docs

2 years agoconvert move_to_common_column to named sub
Steve Hancock [Thu, 8 Dec 2022 17:57:37 +0000 (09:57 -0800)]
convert move_to_common_column to named sub

2 years agoeliminate remaining loop labels
Steve Hancock [Thu, 8 Dec 2022 17:38:00 +0000 (09:38 -0800)]
eliminate remaining loop labels

This update removes the remaining label loops. I prefer to avoid
them because they introduce the possibility of subtle bugs.

2 years agomake check_to_break a named sub
Steve Hancock [Thu, 8 Dec 2022 16:20:12 +0000 (08:20 -0800)]
make check_to_break a named sub

2 years agosimplify sub dump_block_summary
Steve Hancock [Wed, 7 Dec 2022 16:56:54 +0000 (08:56 -0800)]
simplify sub dump_block_summary

2 years agodocument --dump-block-summary
Steve Hancock [Tue, 6 Dec 2022 17:40:56 +0000 (09:40 -0800)]
document --dump-block-summary

2 years agobreakup sub delete_unmatched_tokens to simplify
Steve Hancock [Tue, 6 Dec 2022 05:54:43 +0000 (21:54 -0800)]
breakup sub delete_unmatched_tokens to simplify

2 years agoautomate perltidy update during random testing
Steve Hancock [Tue, 6 Dec 2022 01:13:47 +0000 (17:13 -0800)]
automate perltidy update during random testing

2 years agoadd package statements to --dump-block-summary
Steve Hancock [Sun, 4 Dec 2022 21:39:59 +0000 (13:39 -0800)]
add package statements to --dump-block-summary

Although package statements are not code blocks, it is very useful
having them included in the output of --dump-block-summary.

2 years agoautomate location of git home
Steve Hancock [Sun, 4 Dec 2022 21:38:39 +0000 (13:38 -0800)]
automate location of git home

2 years agochanged get_perltidy.pl from symlink to file
Steve Hancock [Sun, 4 Dec 2022 02:33:45 +0000 (18:33 -0800)]
changed get_perltidy.pl from symlink to file

2 years agoadd get_perltidy.pl
Steve Hancock [Sun, 4 Dec 2022 02:30:14 +0000 (18:30 -0800)]
add get_perltidy.pl

This gets a local copy of the latest perltidy.pl. This is useful
for debugging and code development.

2 years agosmall cleanups of sub dump_block_summary
Steve Hancock [Sun, 4 Dec 2022 00:35:51 +0000 (16:35 -0800)]
small cleanups of sub dump_block_summary

2 years agosome minor cleanups of the random test setup code
Steve Hancock [Sat, 3 Dec 2022 22:17:27 +0000 (14:17 -0800)]
some minor cleanups of the random test setup code

2 years agobump version to 20221112.01 20221112.01
Steve Hancock [Sat, 3 Dec 2022 01:53:40 +0000 (17:53 -0800)]
bump version to 20221112.01

2 years agofix b1440
Steve Hancock [Fri, 2 Dec 2022 16:53:39 +0000 (08:53 -0800)]
fix b1440

2 years agoadd option -dbs, --dump-block-summary
Steve Hancock [Fri, 2 Dec 2022 16:34:05 +0000 (08:34 -0800)]
add option -dbs, --dump-block-summary

This dumps a summary of code blocks to STDOUT with some complexity measures.
Option -dbt=s can select block types (default 'sub')
Option -dbmx=n can select minimum number of lines (default 20)

2 years agofix b1436, b1439
Steve Hancock [Wed, 30 Nov 2022 21:44:59 +0000 (13:44 -0800)]
fix b1436, b1439

2 years agorevise sub break_list_inner_loop
Steve Hancock [Wed, 30 Nov 2022 15:38:56 +0000 (07:38 -0800)]
revise sub break_list_inner_loop

eliminated a loop redo and improved efficiency

2 years agofix b1433, b1434, b1435
Steve Hancock [Mon, 28 Nov 2022 15:59:26 +0000 (07:59 -0800)]
fix b1433, b1434, b1435

2 years agomerge two similar variables
Steve Hancock [Mon, 28 Nov 2022 04:36:17 +0000 (20:36 -0800)]
merge two similar variables

_rwant_container_open_ is merged into _rbreak_container

2 years agofix manual; the default for -mft=n is 0, not 40
Steve Hancock [Sun, 27 Nov 2022 15:07:37 +0000 (07:07 -0800)]
fix manual; the default for -mft=n is 0, not 40

2 years agoimprove variable name
Steve Hancock [Sun, 27 Nov 2022 15:07:04 +0000 (07:07 -0800)]
improve variable name

2 years agofix b1427
Steve Hancock [Sun, 27 Nov 2022 03:24:54 +0000 (19:24 -0800)]
fix b1427

2 years agofix b1432
Steve Hancock [Sat, 26 Nov 2022 23:34:05 +0000 (15:34 -0800)]
fix b1432

2 years agofix b1428
Steve Hancock [Wed, 23 Nov 2022 16:37:40 +0000 (08:37 -0800)]
fix b1428

2 years agofix b1430
Steve Hancock [Tue, 22 Nov 2022 22:32:37 +0000 (14:32 -0800)]
fix b1430

2 years agofix b1431
Steve Hancock [Sun, 20 Nov 2022 19:03:17 +0000 (11:03 -0800)]
fix b1431

2 years agoFor option -b, leave file unchanged if serious error
Steve Hancock [Sun, 20 Nov 2022 04:28:14 +0000 (20:28 -0800)]
For option -b, leave file unchanged if serious error

2 years agofix issue b1426
Steve Hancock [Fri, 18 Nov 2022 16:16:06 +0000 (08:16 -0800)]
fix issue b1426

2 years agoeliminate sub push_group_line
Steve Hancock [Thu, 17 Nov 2022 16:46:53 +0000 (08:46 -0800)]
eliminate sub push_group_line

This sub was brought inline for efficiency and clarity.

2 years agoonly save logfile when specifically requested
Steve Hancock [Wed, 16 Nov 2022 16:40:19 +0000 (08:40 -0800)]
only save logfile when specifically requested

Previously, a logfile might also be saved if the code detected
an internal bug. The chance of this is now close to zero, and the user
can always rerun to get a log if necessary.

2 years agoadd comment
Steve Hancock [Tue, 15 Nov 2022 13:21:24 +0000 (05:21 -0800)]
add comment

2 years agoremove some fixed package names from error messages
Steve Hancock [Tue, 15 Nov 2022 02:35:18 +0000 (18:35 -0800)]
remove some fixed package names from error messages

2 years agoavoid writing to logfile if it will not be saved
Steve Hancock [Mon, 14 Nov 2022 19:32:15 +0000 (11:32 -0800)]
avoid writing to logfile if it will not be saved

2 years agosome minor optimizations
Steve Hancock [Mon, 14 Nov 2022 15:20:50 +0000 (07:20 -0800)]
some minor optimizations

2 years agoupdate version to 20221112 20221112
Steve Hancock [Fri, 11 Nov 2022 04:28:29 +0000 (20:28 -0800)]
update version to 20221112

2 years agoFix rt #145095, undef warning in Perl before 5.12
Steve Hancock [Fri, 11 Nov 2022 00:01:27 +0000 (16:01 -0800)]
Fix rt #145095, undef warning in Perl before 5.12

`length(undef)` issues a warning on Perl older than 5.12.

2 years agoupdate docs
Steve Hancock [Wed, 9 Nov 2022 16:57:18 +0000 (08:57 -0800)]
update docs

2 years agoincrease max_mccabe to 130 for sub check_options
Steve Hancock [Wed, 9 Nov 2022 16:55:43 +0000 (08:55 -0800)]
increase max_mccabe to 130 for sub check_options

2 years agoremove unused code
Steve Hancock [Tue, 8 Nov 2022 04:41:57 +0000 (20:41 -0800)]
remove unused code

2 years agofix issue b1422, resolve conflicting comma controls
Steve Hancock [Mon, 7 Nov 2022 23:12:27 +0000 (15:12 -0800)]
fix issue b1422, resolve conflicting comma controls

2 years agoupdate version to 20111111
Steve Hancock [Mon, 7 Nov 2022 15:39:37 +0000 (07:39 -0800)]
update version to 20111111

2 years agoremove unused code
Steve Hancock [Sat, 5 Nov 2022 20:21:19 +0000 (13:21 -0700)]
remove unused code

2 years agofix c161, b1424, 1425
Steve Hancock [Sat, 5 Nov 2022 13:31:38 +0000 (06:31 -0700)]
fix c161, b1424, 1425
This simplifies code which gives priority to -wn over -pvt when both might apply

2 years agomark files with errors as converged to clarify error messages
Steve Hancock [Fri, 4 Nov 2022 00:28:56 +0000 (17:28 -0700)]
mark files with errors as converged to clarify error messages

2 years agofix irregular -ce indentation seen in rt #144979
Steve Hancock [Fri, 4 Nov 2022 00:08:33 +0000 (17:08 -0700)]
fix irregular -ce indentation seen in rt #144979

2 years agofix b1423
Steve Hancock [Thu, 3 Nov 2022 14:15:23 +0000 (07:15 -0700)]
fix b1423

2 years agofix b1408
Steve Hancock [Wed, 2 Nov 2022 22:13:06 +0000 (15:13 -0700)]
fix b1408

2 years agofix b1421
Steve Hancock [Tue, 1 Nov 2022 16:43:09 +0000 (09:43 -0700)]
fix b1421

2 years agofix b1419
Steve Hancock [Sun, 30 Oct 2022 17:15:45 +0000 (10:15 -0700)]
fix b1419

2 years agofix issue tokenizing 'x' operator, b1410
Steve Hancock [Sun, 30 Oct 2022 17:13:29 +0000 (10:13 -0700)]
fix issue tokenizing 'x' operator, b1410

2 years agofix b1413, b1415
Steve Hancock [Sun, 30 Oct 2022 14:49:26 +0000 (07:49 -0700)]
fix b1413, b1415

2 years agoskip formatting and output verbatim on any brace errors
Steve Hancock [Sun, 30 Oct 2022 14:01:06 +0000 (07:01 -0700)]
skip formatting and output verbatim on any brace errors

2 years agofix b1402
Steve Hancock [Sat, 29 Oct 2022 23:19:40 +0000 (16:19 -0700)]
fix b1402

2 years agofix b1409
Steve Hancock [Sat, 29 Oct 2022 15:06:38 +0000 (08:06 -0700)]
fix b1409

2 years agofix b1399
Steve Hancock [Sat, 29 Oct 2022 01:23:03 +0000 (18:23 -0700)]
fix b1399

2 years agoconsolidate several stress variables
Steve Hancock [Sat, 29 Oct 2022 00:00:41 +0000 (17:00 -0700)]
consolidate several stress variables

2 years agorevise -wtc=h and i to fix b1401 b1403 b1404
Steve Hancock [Fri, 28 Oct 2022 13:02:42 +0000 (06:02 -0700)]
revise -wtc=h and i to fix b1401 b1403 b1404