Skip to content

Commit 91904aa

Browse files
committed
Make --iterations flag for tidyall actually work
1 parent 007b3a0 commit 91904aa

File tree

2 files changed

+18
-2
lines changed

2 files changed

+18
-2
lines changed

Changes

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
- Added documentation for the -j/--jobs flag to the tidyall script's help
44
output and POD docs.
55

6+
- Make the --iterations flag for bin/tidyall actually work. This had been
7+
documented but it has never actually done anything (though setting this in
8+
your config file does work).
9+
610

711
0.71 2018-09-12
812

bin/tidyall

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,19 @@ sub usage {
5656
}
5757

5858
my (
59-
%params, $all_files, $conf_file, $conf_name, $git_files,
60-
$help, $inc_dirs, $pipe, $svn_files, $version
59+
%params,
60+
$all_files,
61+
$git_files,
62+
$pipe,
63+
$svn_files,
64+
$conf_file,
65+
$conf_name,
66+
$iterations,
67+
$inc_dirs,
68+
$version,
69+
$help,
6170
);
71+
6272
my @conf_names = Code::TidyAll->default_conf_names;
6373

6474
GetOptions(
@@ -80,6 +90,7 @@ GetOptions(
8090
'conf-file=s' => \$conf_file,
8191
'conf-name=s' => \$conf_name,
8292
'data-dir=s' => \$params{data_dir},
93+
'iterations=i' => \$iterations,
8394
'no-backups' => \$params{no_backups},
8495
'no-cache' => \$params{no_cache},
8596
'no-cleanup' => \$params{no_cleanup},
@@ -100,6 +111,7 @@ unshift( @INC, split( /\s*,\s*/, $inc_dirs ) ) if defined($inc_dirs);
100111
for my $key (qw( data_dir root_dir )) {
101112
$params{$key} = path( $params{$key} ) if exists $params{$key};
102113
}
114+
$params{iterations} = $iterations if $iterations;
103115

104116
($conf_file) = ( grep { $_->is_file } map { $params{root_dir}->child($_) } @conf_names )
105117
if $params{root_dir} && !$conf_file;

0 commit comments

Comments
 (0)