Shlomi Fish avatar Shlomi Fish committed 9899e40

Remove trailing space

Comments (0)

Files changed (9)

File-Find-Object-Rule/Changes

 ChangeLog for File-Find-Object-Rule:
 ------------------------------------
 
+    - Remove trailing space.
+
 0.0302      Tue 25 Dec 22:35:01 IST 2012
     - Update the repository URL.
     - Link to the Path::Class::Rule overview of directory traversal
     File-Find-Object-Rule .
 
 0.0200      Sun Mar  1 22:24:21 IST 2009
-    - hopefully got rid of all UNIXisms (and incompatibilities with Win32), and 
-    problems such as running when having temporary files (*~) in the test 
+    - hopefully got rid of all UNIXisms (and incompatibilities with Win32), and
+    problems such as running when having temporary files (*~) in the test
     files:
         - now holding a pristine copy of the test tree under
             ./t/sample-data/to-copy-from/
         which was borrowed from the File::Find::Object code.
         - Converted all the paths constant to variables, which are generated
         using $tree_creator->get_path().
-        - Removed some non-portable assertions or ones that are hard to 
+        - Removed some non-portable assertions or ones that are hard to
         reproduce with File::Spec.
         - Added Test::Count annotations to the tests' code.
 
 -----------------------------
 
 0.30 Wednesday 1st June, 2006
-	Made './//././././///.//././/////./blah' be treated the same 
+	Made './//././././///.//././/////./blah' be treated the same
         as './blah' (it gets turned into 'blah')
 
 0.29 Tuesday 16th May, 2006
 0.22 Friday 3rd October, 2003
 	add in ->extras hash for passing things through to File::Find::find
 
-0.21 Monday 15th September, 2003 
+0.21 Monday 15th September, 2003
 	pod glitch in File::Find::Rule::Procedural spotted and fixed
 	by Tom Hukins
 
 0.10	10th March 2003
 	- fixup an accidental warning in the stat-based tests.  Caught
 	  by Alex Gough (rt.cpan.org #2138)
-	- make the findrule tests more win32 safe/shell independent (picked 
+	- make the findrule tests more win32 safe/shell independent (picked
 	  up by Philip Newton)
 	- autogenerate READMEs from bits and pieces
 

File-Find-Object-Rule/MANIFEST

 t/sample-data/to-copy-from/findorule.t
 t/sample-data/to-copy-from/foobar
 t/sample-data/to-copy-from/lib/File/Find/Object/Rule/Test/ATeam.pm
+t/style-trailing-space.t
 META.json

File-Find-Object-Rule/README

 
 =head1 SEE ALSO
 
-L<File::Find::Object>, L<Text::Glob>, L<Number::Compare>, 
+L<File::Find::Object>, L<Text::Glob>, L<Number::Compare>,
 L<File::Find::Object::Rule>, find(1)
 
 If you want to know about the procedural interface, see

File-Find-Object-Rule/inc/Test/Run/Builder.pm

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

File-Find-Object-Rule/lib/File/Find/Object/Rule.pm

 File::Find::Object::Rule is a friendlier interface to L<File::Find::Object> .
 It allows you to build rules which specify the desired files and directories.
 
-B<WARNING> : This module is a fork of version 0.30 of L<File::Find::Rule> 
-(which has been unmaintained for several years as of February, 2009), and may 
-still have some bugs due to its reliance on File::Find'isms. As such it is 
-considered Alpha software. Please report any problems with 
-L<File::Find::Object::Rule> to its RT CPAN Queue. 
+B<WARNING> : This module is a fork of version 0.30 of L<File::Find::Rule>
+(which has been unmaintained for several years as of February, 2009), and may
+still have some bugs due to its reliance on File::Find'isms. As such it is
+considered Alpha software. Please report any problems with
+L<File::Find::Object::Rule> to its RT CPAN Queue.
 
 =cut
 
     my $referent = shift;
     my $class = ref $referent || $referent;
 
-    return 
+    return
     bless {
         rules    => [],  # [0]
         _subs     => [],  # [1]
 
 =item C<exec( \&subroutine( $shortname, $path, $fullname ) )>
 
-Allows user-defined rules.  Your subroutine will be invoked with parameters of 
+Allows user-defined rules.  Your subroutine will be invoked with parameters of
 the name, the path you're in, and the full relative filename.
 In addition, C<$_> is set to the current short name, but its use is
 discouraged since as opposed to File::Find::Rule, File::Find::Object::Rule
     my $code = 'sub {
         my $path_obj = shift;
         my $path = shift;
-        
+
         if (!defined($path_obj))
         {
             return;
         {
             $finder->set_traverse_to(
                 $preproc_cb->(
-                        $self, 
+                        $self,
                         [ @{$finder->get_current_node_files_list()} ]
                 )
             );
 
 Corresponds to C<-l>.
 
-=head2 uid 
+=head2 uid
 
 See "stat tests".
 

File-Find-Object-Rule/t/File-Find-Rule.t

                 'contents' => $tree_creator->cat(
                     "./t/sample-data/to-copy-from/File-Find-Rule.t"
                 ),
-            },            
+            },
             {
                 'name' => "findorule.t",
                 'contents' => $tree_creator->cat(
                 'contents' => $tree_creator->cat(
                     "./t/sample-data/to-copy-from/foobar"
                 ),
-                
+
             },
             {
                 'name' => "lib/",
 content => $tree_creator->cat(
     "./t/sample-data/to-copy-from/lib/File/Find/Object/Rule/Test/ATeam.pm"
 
-), 
+),
 }
                                                         ],
                                                     },
 
 my @ateam_path =
     map { $tree_creator->get_path("./t/sample-data/copy-to/$_") }
-    qw( 
+    qw(
         lib
         lib/File
         lib/File/Find
         lib/File/Find/Object
         lib/File/Find/Object/Rule
         lib/File/Find/Object/Rule/Test
-        lib/File/Find/Object/Rule/Test/ATeam.pm 
+        lib/File/Find/Object/Rule/Test/ATeam.pm
     );
 
 my $ATeam_pm_fn = $ateam_path[-1];

File-Find-Object-Rule/t/findorule.t

                 'contents' => $tree_creator->cat(
                     "./t/sample-data/to-copy-from/File-Find-Rule.t"
                 ),
-            },            
+            },
             {
                 'name' => "findorule.t",
                 'contents' => $tree_creator->cat(
                 'contents' => $tree_creator->cat(
                     "./t/sample-data/to-copy-from/foobar"
                 ),
-                
+
             },
             {
                 'name' => "lib/",
 content => $tree_creator->cat(
     "./t/sample-data/to-copy-from/lib/File/Find/Object/Rule/Test/ATeam.pm"
 
-), 
+),
 }
                                                         ],
                                                     },
               [ $foobar_fn ], 'grouping ( -literal )');
 }
 
-# Remming out due to capturing STDERR using unixisms. In the future, we 
+# Remming out due to capturing STDERR using unixisms. In the future, we
 # may implement this using Test::Trap.
 # is_deeply(run $copy_fn . ' -file -name foobar baz',
 #          [ "unknown option 'baz'" ], 'no implicit grouping');

File-Find-Object-Rule/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-Find-Object-Rule/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."
+);
+
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.