Skip to content

Commit

Permalink
Update perltidy configuration
Browse files Browse the repository at this point in the history
Update perltidy configuration for Perl critic tests, taking advantage
of new perltidy features: add line breaks after labels, enable
vertical alignment for => pairs, add trailing commas to multiline
lists, and align trailing unless with trailing if.  Thanks, Julien
ÉLIE.
  • Loading branch information
rra committed Dec 31, 2023
1 parent 6a3da8c commit 493e6c3
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
6 changes: 6 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ rra-c-util 10.5 (unreleased)
to specify an additional list of regular expressions matching files
that the check for SPDX license headers should ignore.

Update perltidy configuration for Perl critic tests, taking advantage
of new perltidy features: add line breaks after labels, enable
vertical alignment for => pairs, add trailing commas to multiline
lists, and align trailing unless with trailing if. Thanks, Julien
ÉLIE.

Ignore files created by the Perl Carton tool, JSON files, and
temporary files generated by tests when checking for SPDX licenses and
Perl strictness in standard tests.
Expand Down
9 changes: 8 additions & 1 deletion tests/data/perltidyrc
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#
# SPDX-License-Identifier: FSFAP

-bal=1 # put line breaks after a label
-bbao # put line breaks before any operator
-bfvt=2 # no newline before "or" after closing brace
-nbbc # don't force blank lines before comments (bad for else blocks)
Expand All @@ -25,8 +26,14 @@
-ce # cuddle braces around else
-l=79 # usually use 78, but don't want 79-long lines reformatted
-nlop # disable vertical alignment of logical and ternary expressions
-vil='=>' # enable vertical alignment for hash definitions
-pt=2 # don't add extra whitespace around parentheses
-sbt=2 # ...or square brackets
-nsfs # no space before semicolon in for (not that I use this form)
-nvc # disable vertical alignment of = and similar symbols
-xci # improve indentation of nested structures
-drc # delete repeated commas in a list
-wtc=m # add trailing commas to key => value pairs
-atc # add trailing commas where needed
-dtc # delete trailing commas where needed
-dwic # remove commas interfering with welds
-viu # align trailing unless with if (not that I use unless)

0 comments on commit 493e6c3

Please sign in to comment.