Skip to content

Commit

Permalink
Merge pull request #1145 from drgrice1/perltidy-update
Browse files Browse the repository at this point in the history
Switch to using the latest Perl::Tidy (version 20240903).
  • Loading branch information
somiaj authored Dec 10, 2024
2 parents 0ca9c31 + 35cdaad commit 94bac43
Show file tree
Hide file tree
Showing 31 changed files with 166 additions and 170 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/parse-problem-doc.pl
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ BEGIN
use File::Basename qw(fileparse basename);
use Getopt::Long;
use File::Copy qw(copy);
use YAML::XS qw(DumpFile);
use YAML::XS qw(DumpFile);
use Pod::Simple::Search;

use SampleProblemParser qw(parseSampleProblem generateMetadata);
Expand Down
1 change: 0 additions & 1 deletion bin/perltidy-pg.rc
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,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
5 changes: 2 additions & 3 deletions bin/run-perltidy.pl
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,8 @@ =head1 OPTIONS

my $pg_root = curfile->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 pg root directory is not readable.\n"
unless -r "$pg_root/.perltidyrc";

Expand Down
4 changes: 2 additions & 2 deletions lib/Fun.pm
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,8 @@ my $FUNCTION_REFERENCE = "Fun";

my %fields = (
tstart => -1, # (tstart,$tstop) constitutes the domain
tstop => 1,
steps => 50,
tstop => 1,
steps => 50,
color => 'blue',
x_rule => \&identity,
y_rule => \&identity,
Expand Down
2 changes: 1 addition & 1 deletion lib/Hermite.pm
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ sub internal_critical_points {
}

sub internal_inflection_points {
my ($x0, $l, $lp,, $x1, $r, $rp, $rh_roots, $rf_function) = @_;
my ($x0, $l, $lp, $x1, $r, $rp, $rh_roots, $rf_function) = @_;
#data for one segment of the hermite spline

# coefficients for the approximating polynomial
Expand Down
6 changes: 3 additions & 3 deletions lib/Regression.pm
Original file line number Diff line number Diff line change
Expand Up @@ -431,9 +431,9 @@ if (DEBUGGING) {

my $reg = Statistics::Regression->new(3, "sample regression", [ "const", "someX", "someY" ]);
$reg->include(2.0, [ 1.0, 3.0, -1.0 ]);
$reg->include(1.0, [ 1.0, 5.0, 2.0 ]);
$reg->include(20.0, [ 1.0, 31.0, 0.0 ]);
$reg->include(15.0, [ 1.0, 11.0, 2.0 ]);
$reg->include(1.0, [ 1.0, 5.0, 2.0 ]);
$reg->include(20.0, [ 1.0, 31.0, 0.0 ]);
$reg->include(15.0, [ 1.0, 11.0, 2.0 ]);

# $reg->print(); or: my $coefs= $reg->theta(); print @coefs; print $reg->rsq;
# my $coefs= $reg->theta(); print $coeff[0];
Expand Down
2 changes: 1 addition & 1 deletion lib/SampleProblemParser.pm
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ use experimental 'signatures';
use feature 'say';

use File::Basename qw(dirname basename);
use File::Find qw(find);
use File::Find qw(find);
use Pandoc;

our @EXPORT_OK = qw(parseSampleProblem generateMetadata);
Expand Down
Loading

0 comments on commit 94bac43

Please sign in to comment.