[sheepdog] [PATCH] checkpatch: fix a false warning

Robin Dong robin.k.dong at gmail.com
Tue Dec 3 05:11:27 CET 2013


Looks good to me.

Reviewed-by: Robin Dong <sanbai at taobao.com>


2013/12/1 Liu Yuan <namei.unix at gmail.com>

>  /* one liner */
> ...
> some stuff
> ...
>  * blabla
>  * blabla
>  */
>
> Above is a valid comment, but current check will warn falsely
>
> Signed-off-by: Liu Yuan <namei.unix at gmail.com>
> ---
>  script/checkpatch.pl |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/script/checkpatch.pl b/script/checkpatch.pl
> index c57380b..520a5db 100755
> --- a/script/checkpatch.pl
> +++ b/script/checkpatch.pl
> @@ -1734,8 +1734,8 @@ sub process {
>                                      "[BCS] don't use block comments for
> one liner comment\n" . $hereprev);
>                         } else {
>                                 # case E
> -                               my $ln = $linenr;
> -                               while ($rawlines[$ln] !~ /^\+\s*\/\*/ &&
> $ln >= 0) { $ln--; }
> +                               my $ln = $linenr - 1;
> +                               while ($rawlines[$ln] =~ /^\+/ &&
> $rawlines[$ln] !~ /^\+\s*\/\*/ && $ln >= 0) { $ln--; }
>                                 if ($rawlines[$ln] =~ /^\+\s*\/\*./) {
>                                         WARN("BLOCK_COMMENT_STYLE",
>                                              "[BCS] don't comment at first
> line in block comments\n" . $hereprev);
> --
> 1.7.9.5
>
> --
> sheepdog mailing list
> sheepdog at lists.wpkg.org
> http://lists.wpkg.org/mailman/listinfo/sheepdog
>



-- 
--
Best Regard
Robin Dong
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wpkg.org/pipermail/sheepdog/attachments/20131203/6a01d33e/attachment-0004.html>


More information about the sheepdog mailing list