summaryrefslogtreecommitdiffstats
path: root/t/Support/Files.pm
diff options
context:
space:
mode:
authorPerl Tidy <perltidy@bugzilla.org>2018-12-05 21:38:52 +0100
committerDylan William Hardison <dylan@hardison.net>2018-12-05 23:49:08 +0100
commit8ec8da0491ad89604700b3e29a227966f6d84ba1 (patch)
tree9d270f173330ca19700e0ba9f2ee931300646de1 /t/Support/Files.pm
parenta7bb5a65b71644d9efce5fed783ed545b9336548 (diff)
downloadbugzilla-8ec8da0491ad89604700b3e29a227966f6d84ba1.tar.gz
bugzilla-8ec8da0491ad89604700b3e29a227966f6d84ba1.tar.xz
no bug - reformat all the code using the new perltidy rules
Diffstat (limited to 't/Support/Files.pm')
-rw-r--r--t/Support/Files.pm60
1 files changed, 31 insertions, 29 deletions
diff --git a/t/Support/Files.pm b/t/Support/Files.pm
index 603d95cf9..7142b11b9 100644
--- a/t/Support/Files.pm
+++ b/t/Support/Files.pm
@@ -17,56 +17,58 @@ use File::Find;
our @additional_files = ();
use constant IGNORE => qw(
- Bugzilla/DuoAPI.pm
- Bugzilla/DuoWeb.pm
+ Bugzilla/DuoAPI.pm
+ Bugzilla/DuoWeb.pm
);
our @files = glob('*');
-find(sub { push(@files, $File::Find::name) if $_ =~ /\.pm$/;}, qw(Bugzilla docs));
+find(sub { push(@files, $File::Find::name) if $_ =~ /\.pm$/; },
+ qw(Bugzilla docs));
push(@files, 'extensions/create.pl', 'docs/makedocs.pl', 'cpanfile');
-our @extensions =
- grep { $_ ne 'extensions/create.pl' && ! -e "$_/disabled" }
- glob('extensions/*');
+our @extensions = grep { $_ ne 'extensions/create.pl' && !-e "$_/disabled" }
+ glob('extensions/*');
foreach my $extension (@extensions) {
- find(sub { push(@files, $File::Find::name) if $_ =~ /\.pm$|\.pl$/;}, $extension);
+ find(sub { push(@files, $File::Find::name) if $_ =~ /\.pm$|\.pl$/; },
+ $extension);
}
our @test_files = glob('t/*.t xt/*/*.t');
foreach my $extension (@extensions) {
- # Skip disabled extensions
- next if -e "$extension/disabled";
- find(sub { push(@files, $File::Find::name) if $_ =~ /\.pm$/;}, $extension);
+ # Skip disabled extensions
+ next if -e "$extension/disabled";
+
+ find(sub { push(@files, $File::Find::name) if $_ =~ /\.pm$/; }, $extension);
}
sub isTestingFile {
- my ($file) = @_;
- my $exclude;
-
- foreach my $ignore (IGNORE) {
- return undef if $ignore eq $file;
- }
-
- if ($file =~ /\.psgi$|\.cgi$|\.pl$|\.pm$/) {
- return 1;
- }
- my $additional;
- foreach $additional (@additional_files) {
- if ($file eq $additional) { return 1; }
- }
- return undef;
+ my ($file) = @_;
+ my $exclude;
+
+ foreach my $ignore (IGNORE) {
+ return undef if $ignore eq $file;
+ }
+
+ if ($file =~ /\.psgi$|\.cgi$|\.pl$|\.pm$/) {
+ return 1;
+ }
+ my $additional;
+ foreach $additional (@additional_files) {
+ if ($file eq $additional) { return 1; }
+ }
+ return undef;
}
our (@testitems, @module_files);
foreach my $currentfile (@files) {
- if (isTestingFile($currentfile)) {
- push(@testitems, $currentfile);
- }
- push(@module_files, $currentfile) if $currentfile =~ /\.pm$/;
+ if (isTestingFile($currentfile)) {
+ push(@testitems, $currentfile);
+ }
+ push(@module_files, $currentfile) if $currentfile =~ /\.pm$/;
}
1;