Commits

Shlomi Fish committed a49a867

Get rid of trailing space.

  • Participants
  • Parent commits 16fd7ea

Comments (0)

Files changed (11)

File File-Dir-Dumper/Changes

         - Get rid of Makefile.PL.
         - Move to scripts/bump-version-number.pl
         - Update the repository URL.
+        - Get rid of trailing space - t/style-trailing-space.t .
 
 v0.0.7   2010-06-30
 

File File-Dir-Dumper/MANIFEST

 t/pod.t
 t/sample-data/placeholder.txt
 t/script.t
+t/style-trailing-space.t
 t/test-stream.t
 META.json

File File-Dir-Dumper/README

 File-Dir-Dumper
 
-File-Dir-Dumper aims to dump directory structures in a consistent, machine 
+File-Dir-Dumper aims to dump directory structures in a consistent, machine
 parsable and moderately-human-readable way. It makes use of File-Find-Object,
 and the JSON format.
 

File File-Dir-Dumper/inc/Test/Run/Builder.pm

         Test::Run::CmdLine::Iface->new(
             {
                 'test_files' => [glob("t/*.t")],
-            }   
+            }
             # 'backend_params' => $self->_get_backend_params(),
         );
 
 sub ACTION_tags
 {
     my $self = shift;
-    return 
+    return
         $self->do_system(
             "ctags",
             qw(-f tags --recurse --totals

File File-Dir-Dumper/lib/File/Dir/Dumper.pm

 
 =head1 NAME
 
-File::Dir::Dumper - dump directory structures' meta-data in a consistent and 
+File::Dir::Dumper - dump directory structures' meta-data in a consistent and
 machine-readable way.
 
 =head1 VERSION

File File-Dir-Dumper/lib/File/Dir/Dumper/App.pm

 
 =head1 NAME
 
-File::Dir::Dumper::App - a command line app-implemented as a class to do the 
+File::Dir::Dumper::App - a command line app-implemented as a class to do the
 dumping.
 
 =head1 VERSION
     );
 
     pod2usage(1) if $help;
-    pod2usage(-exitstatus => 0, -verbose => 2) if $man;    
+    pod2usage(-exitstatus => 0, -verbose => 2) if $man;
 
     my $dir_to_dump = shift(@$argv);
 

File File-Dir-Dumper/lib/File/Dir/Dumper/Scanner.pm

 
     $self->_user_cache({});
     $self->_group_cache({});
-    
+
     return;
 }
 
     {
         *_my_getpwuid =
             sub {
-                my $uid = shift; return scalar(getpwuid($uid)); 
+                my $uid = shift; return scalar(getpwuid($uid));
             };
-        *_my_getgrgid = 
+        *_my_getgrgid =
             sub {
                 my $gid = shift; return scalar(getgrgid($gid));
             };

File File-Dir-Dumper/lib/File/Dir/Dumper/Stream/JSON/Writer.pm

     .
     .
     .
-    
+
     $writer->close();
 
 =head1 METHODS

File File-Dir-Dumper/t/dumper.t

     is ($token->{type}, "header", "Token is of type header");
 
     # TEST
-    is ($token->{dir_to_dump}, $t->get_path($test_dir), 
+    is ($token->{dir_to_dump}, $t->get_path($test_dir),
         "dir_to_dump is OK."
     );
 
 
     # TEST
     is ($token->{depth}, 1, "Token depth is 1");
-    
+
     $token = $scanner->fetch();
 
     # TEST
 
     # TEST
     is ($token->{depth}, 2, "Token depth is 2");
-    
+
     $token = $scanner->fetch();
 
     # TEST
 
     # TEST
     is ($token->{depth}, 0, "Token depth is 0");
-    
+
     $token = $scanner->fetch();
 
     # TEST

File File-Dir-Dumper/t/lib/File/Find/Object/TreeCreate.pm

     {
         push @components, File::Spec->curdir();
     }
-    
+
     my $is_dir = ($path =~ s{/$}{});
     push @components, split(/\//, $path);
     if ($is_dir)
     my $self = shift;
     opendir my $dir, $self->get_path(@_) or
         return undef;
-    my @files = 
-        sort { $a cmp $b } 
+    my @files =
+        sort { $a cmp $b }
         grep { !(($_ eq ".") || ($_ eq "..")) }
         readdir($dir);
-    closedir($dir);    
+    closedir($dir);
     return \@files;
 }
 

File File-Dir-Dumper/t/style-trailing-space.t

+#!/usr/bin/perl
+
+use strict;
+use warnings;
+
+use Test::More;
+
+eval "use Test::TrailingSpace";
+if ($@)
+{
+    plan skip_all => "Test::TrailingSpace required for trailing space test.";
+}
+else
+{
+    plan tests => 1;
+}
+
+my $finder = Test::TrailingSpace->new(
+    {
+        root => '.',
+        filename_regex => qr/(?:(?:\.(?:t|pm|pl|PL|yml|json|arc|vim))|README|Changes|LICENSE|MANIFEST)\z/,
+    },
+);
+
+# TEST
+$finder->no_trailing_space(
+    "No trailing space was found."
+);
+