Messages in this thread | | | Subject | Re: [PATCH] checkpatch: do not exit in main process subroutine | From | Joe Perches <> | Date | Sun, 31 Mar 2013 21:55:37 -0600 |
| |
On Sat, 2013-03-30 at 18:30 +0800, zhangwei(Jovi) wrote: > On 2013/3/28 11:43, zhangwei(Jovi) wrote: > > Currently checkpatch program exit when process empty file, > > This will cause issue when @ARGV include many files ready to check. [] > > diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl > > @@ -3634,19 +3634,19 @@ sub process { > > # If we have no input at all, then there is nothing to report on > > # so just keep quiet. > > if ($#rawlines == -1) { > > - exit(0); > > + return $clean; > > }
I think instead this should be something like adding
if (!is_patch && $#rawlines == -1) { return $clean; }
though maybe expecting checkpatch to avoid empty files when fed a directory list is unrealistic.
| |