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

Liu Yuan namei.unix at gmail.com
Wed Jul 24 06:53:55 CEST 2013


+* 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..42f5d7d 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*\/\*/ && !~ /^\+\s*\/\*$/) {
 					WARN("BLOCK_COMMENT_STYLE",
 					     "[BCS] don't comment at first line in block comments\n" . $hereprev);
 				}
-- 
1.7.9.5




More information about the sheepdog mailing list