[sheepdog] [PATCH v2] checkpath: fix block comment false alarm

MORITA Kazutaka morita.kazutaka at lab.ntt.co.jp
Thu Jul 25 05:49:33 CEST 2013


At Wed, 24 Jul 2013 21:39:54 +0800,
Liu Yuan wrote:
> 
> +* blabla.
> +* blabla.
> +*/
> 
> Above in the patch file is valid block comments
> 
> Signed-off-by: Liu Yuan <namei.unix at gmail.com>
> ---
>  script/checkpatch.pl |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/script/checkpatch.pl b/script/checkpatch.pl
> index ccdc58a..eb1d97a 100755
> --- a/script/checkpatch.pl
> +++ b/script/checkpatch.pl
> @@ -1736,7 +1736,7 @@ sub process {
>  				# case E
>  				my $ln = $linenr;
>  				while ($rawlines[$ln] !~ /^\+\s*\/\*/ && $ln >= 0) { $ln--; }
> -				if ($rawlines[$ln] !~ /^\+\s*\/\*$/) {
> +				if ($rawlines[$ln] =~ /^\+\s*\/\*/ && $rawlines[$ln] !~ /^\+\s*\/\*$/) {

This looks a bit complicated.  The following does the same thing?

  if ($rawlines[$ln] =~ /^\+\s*\/\*./) {

Thanks,

Kazutaka



More information about the sheepdog mailing list