Skip to content

Commit

Permalink
Switch to using Perl::Tidy version 20240903 (the latest).
Browse files Browse the repository at this point in the history
This commit just makes the changes in the scripts, but does not yet run
perltidy with the new setup.  That will be done in the next commit.

Note that the `-vxl='q'` option has been removed.  This option disables
vertical alignment of qw quotes.  Alignment of qw quotes was added in
version 20220613 (the previous version), and this option to disable that
was added to the webwork2 (and pg) perltidy configuration to avoid the
alignment because it changes so many files. However, I don't think that
alignment is bad, and I am tired of adding new options to prevent code
changes.  With this newer version another option would be needed to
prevent the new signed number alignment (although that affects PG much
more than webwork2).
  • Loading branch information
drgrice1 committed Nov 21, 2024
1 parent df4b848 commit 779f313
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/check-formats.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4
- name: Install dependencies
run: cpanm -n Perl::Tidy@20220613
run: cpanm -n Perl::Tidy@20240903
- name: Run perltidy
shell: bash
run: |
Expand Down
1 change: 0 additions & 1 deletion .perltidyrc
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,3 @@
-nlop # No logical padding (this causes mixed tabs and spaces)
-wn # Weld nested containers
-xci # Extended continuation indentation
-vxl='q' # No vertical alignment of qw quotes
2 changes: 1 addition & 1 deletion bin/check_modules.pl
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ =head1 DESCRIPTION
'LWP::Protocol::https' => 6.06,
'Mojolicious' => 9.34,
'Net::SSLeay' => 1.46,
'Perl::Tidy' => 20220613,
'Perl::Tidy' => 20240903,
'SQL::Abstract' => 2.000000
);

Expand Down
5 changes: 2 additions & 3 deletions bin/dev_scripts/run-perltidy.pl
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,8 @@ =head1 OPTIONS

my $webwork_root = curfile->dirname->dirname->dirname;

die "Version 20220613 or newer of perltidy is required for this script.\n"
. "The installed version is $Perl::Tidy::VERSION.\n"
unless $Perl::Tidy::VERSION >= 20220613;
die "Version 20240903 of perltidy is required for this script.\nThe installed version is $Perl::Tidy::VERSION.\n"
unless $Perl::Tidy::VERSION == 20240903;
die "The .perltidyrc file in the webwork root directory is not readable.\n"
unless -r "$webwork_root/.perltidyrc";

Expand Down

0 comments on commit 779f313

Please sign in to comment.