Remove some tabs
authorGreg Sabino Mullane <[email protected]>
Wed, 28 Sep 2016 18:20:47 +0000 (14:20 -0400)
committerGreg Sabino Mullane <[email protected]>
Wed, 28 Sep 2016 18:20:47 +0000 (14:20 -0400)
t/00_release.t
t/99_perlcritic.t
t/99_spellcheck.t

index 36604b700cb96faf0551a2fff25b5c86bced8b81..efac6b4fbe062adcaf5ec9eec58c8c119b2ab1e5 100644 (file)
@@ -20,8 +20,8 @@ my $file = 'MANIFEST';
 my @mfiles;
 open my $mfh, '<', $file or die qq{Could not open "$file": $!\n};
 while (<$mfh>) {
-       next if /^#/;
-       push @mfiles => $1 if /(\S.+)/o;
+    next if /^#/;
+    push @mfiles => $1 if /(\S.+)/o;
 }
 close $mfh or warn qq{Could not close "$file": $!\n};
 
@@ -108,43 +108,43 @@ else {
 ## Make sure all files in the MANIFEST are "clean": no tabs, no unusual characters
 
 for my $mfile (@mfiles) {
-       file_is_clean($mfile);
+    file_is_clean($mfile);
 }
 
 sub file_is_clean {
 
-       my $file = shift or die; ## no critic (ProhibitReusedNames)
-
-       if (!open $fh, '<', $file) {
-               fail qq{Could not open "$file": $!\n};
-               return;
-       }
-       $good = 1;
-       my $inside_copy = 0;
-       while (<$fh>) {
-               if (/^COPY .+ FROM stdin/i) {
-                       $inside_copy = 1;
-               }
-               if (/^\\./ and $inside_copy) {
-                       $inside_copy = 0;
-               }
-               if (/\t/ and $file ne 'Makefile.PL' and $file !~ /\.html$/ and ! $inside_copy) {
-                       diag "Found a tab at line $. of $file\n";
-                       $good = 0;
-               }
-               if (! /^[\S ]*/) {
-                       diag "Invalid character at line $. of $file: $_\n";
-                       $good = 0; die;
-               }
-       }
-       close $fh or warn qq{Could not close "$file": $!\n};
-
-       if ($good) {
-               pass "The $file file has no tabs or unusual characters";
-       }
-       else {
-               fail "The $file file did not pass inspection!";
-       }
+    my $file = shift or die; ## no critic (ProhibitReusedNames)
+
+    if (!open $fh, '<', $file) {
+        fail qq{Could not open "$file": $!\n};
+        return;
+    }
+    $good = 1;
+    my $inside_copy = 0;
+    while (<$fh>) {
+        if (/^COPY .+ FROM stdin/i) {
+            $inside_copy = 1;
+        }
+        if (/^\\./ and $inside_copy) {
+            $inside_copy = 0;
+        }
+        if (/\t/ and $file ne 'Makefile.PL' and $file !~ /\.html$/ and ! $inside_copy) {
+            diag "Found a tab at line $. of $file\n";
+            $good = 0;
+        }
+        if (! /^[\S ]*/) {
+            diag "Invalid character at line $. of $file: $_\n";
+            $good = 0; die;
+        }
+    }
+    close $fh or warn qq{Could not close "$file": $!\n};
+
+    if ($good) {
+        pass "The $file file has no tabs or unusual characters";
+    }
+    else {
+        fail "The $file file did not pass inspection!";
+    }
 
 }
 
index 4a1e449e83d4edb9c181104805be54b1659ff9c5..5bed531dd1eda86a3bd1bc3a54e062e3594659f8 100644 (file)
@@ -41,17 +41,17 @@ for my $filename (qw{Makefile.PL check_postgres.pl t/CP_Testing.pm}) {
     -e $filename or die qq{Could not find "$filename"!};
     open my $oldstderr, '>&', \*STDERR or die 'Could not dupe STDERR';
     close STDERR or die qq{Could not close STDERR: $!};
-       my @vio;
-       my $ranok = 0;
-       eval {
-               @vio = $critic->critique($filename);
-               $ranok = 1;
-       };
-       if (! $ranok) {
-               pass "Perl::Critic failed for file $filename. Error was: $@\n";
-               $@ = undef;
-               next;
-       }
+    my @vio;
+    my $ranok = 0;
+    eval {
+        @vio = $critic->critique($filename);
+        $ranok = 1;
+    };
+    if (! $ranok) {
+        pass "Perl::Critic failed for file $filename. Error was: $@\n";
+        $@ = undef;
+        next;
+    }
     open STDERR, '>&', $oldstderr or die 'Could not recreate STDERR'; ## no critic
     close $oldstderr or die qq{Could not close STDERR copy: $!};
     my $vios = 0;
index 37a6f80114dd3ce8348ce1f71fce61af7a54e5a0..070b28d0864329f918bbb7bb9761173d0b595817 100644 (file)
@@ -79,19 +79,19 @@ SKIP: {
         skip 'Need Pod::Text to re-test the spelling of embedded POD', 1;
     }
 
-       my $parser = Pod::Text->new (quotes => 'none');
+    my $parser = Pod::Text->new (quotes => 'none');
 
     for my $file (qw{check_postgres.pl}) {
         if (! -e $file) {
             fail(qq{Could not find the file "$file"!});
         }
-               my $string;
-               my $tmpfile = "$file.tmp";
+        my $string;
+        my $tmpfile = "$file.tmp";
         $parser->parse_from_file($file, $tmpfile);
-               next if ! open my $fh, '<', $tmpfile;
-               { local $/; $string = <$fh>; }
-               close $fh or warn "Could not close $tmpfile\n";
-               unlink $tmpfile;
+        next if ! open my $fh, '<', $tmpfile;
+        { local $/; $string = <$fh>; }
+        close $fh or warn "Could not close $tmpfile\n";
+        unlink $tmpfile;
         spellcheck("POD from $file" => $string, $file);
     }
 }